Skip to content

Commit

Permalink
Ready project for multi-site builds
Browse files Browse the repository at this point in the history
We will need a dedicated one for each schema too, not just the main
ontology.
  • Loading branch information
mih committed Dec 18, 2023
1 parent ea58a9a commit 41f5b5f
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sitebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
#mkdir -p ./build/upload
#export "SITEDIR=./build/upload/$(git branch --show-current)"
#export "SITEURL=https://concepts.datalad.org/$(git branch --show-current)"
make mkdocs-site
make build/mkdocs-site
make build/context.jsonld
#mv ./build/mkdocs-site $SITEDIR
mv ./build/mkdocs-site ./build/upload
Expand Down
24 changes: 10 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ build/context.jsonld: src/linkml/ontology.yaml
--mergeimports \
$< > $@

linkml-docs: linkml-docs-stamp
linkml-docs-stamp:
build/linkml-docs: build/linkml-docs/ontology
build/linkml-docs/%: src/linkml/%.yaml src/extra-docs/%
gen-doc \
--mergeimports \
--hierarchical-class-view \
Expand All @@ -18,19 +18,15 @@ linkml-docs-stamp:
--diagram-type er_diagram \
--metadata \
--format markdown \
-d build/linkml-docs \
src/linkml/ontology.yaml
touch $@

extra-docs: extra-docs-stamp
extra-docs-stamp:
mkdir -p build/linkml-docs
cp -r src/extra-docs/* build/linkml-docs
-d $@ \
$<
# try to inject any extra-docs (if any exist)
-cp -r src/extra-docs/$$(basename $@)/*.md $@

mkdocs-site: mkdocs-site-stamp
mkdocs-site-stamp: linkml-docs extra-docs
build/mkdocs-site: build/linkml-docs src/extra-docs/*.md
# top-level content
cp -r src/extra-docs/*.md $<
mkdocs build
touch $@

lint: lint-ontology lint-dataset-graph-schema
lint-ontology: src/linkml/ontology.yaml
Expand All @@ -52,4 +48,4 @@ clean:
rm -rf build
rm -f *-stamp

.PHONY: clean linkml-docs extra-docs mkdocs-site lint validate
.PHONY: clean lint validate
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repo_url: https://github.com/psychoinformatics-de/datalad-concepts
site_author:
site_description:
site_dir: build/mkdocs-site
site_name: DataLad Concepts Ontology (DLCO)
site_name: DataLad Concepts
site_url: !ENV [SITEURL, 'https://concepts.datalad.org']
strict: true
theme:
Expand Down
1 change: 1 addition & 0 deletions src/extra-docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Write me!
1 change: 1 addition & 0 deletions src/extra-docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [DataLad concepts ontology](ontology/)
Empty file.
24 changes: 0 additions & 24 deletions src/linkml/datalad-dataset-graph.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion src/linkml/datalad-datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
id: https://concepts.datalad.org/datalad-datasets
name: datalad-datasets
prefixes:
dlco: https://concepts.datalad.org/
dlco: https://concepts.datalad.org/ontology/
dct: http://purl.org/dc/terms/
imports:
- datasets
Expand Down
2 changes: 1 addition & 1 deletion src/linkml/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ prefixes:
dctypes: http://purl.org/dc/dcmitype/
dct: http://purl.org/dc/terms/
schema: http://schema.org/
dlco: https://concepts.datalad.org/
dlco: https://concepts.datalad.org/ontology/
linkml: https://w3id.org/linkml/
imports:
- linkml:types
Expand Down
4 changes: 2 additions & 2 deletions src/linkml/ontology.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id: https://concepts.datalad.org
id: https://concepts.datalad.org/ontology
name: datalad-concepts-ontology
title: DataLad Concepts Ontology (DLCO)
description: |-
Expand All @@ -7,7 +7,7 @@ license: MIT

prefixes:
linkml: https://w3id.org/linkml/
dlco: https://concepts.datalad.org/
dlco: https://concepts.datalad.org/ontology/

default_prefix: dlco

Expand Down

0 comments on commit 41f5b5f

Please sign in to comment.