diff --git a/Makefile b/Makefile index 6dfcba68c951662eb517b5a8250a7131a8698b04..781bdde0d8c33133637cbf1fa6c1544c39a350c4 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,25 @@ OUTDIR := public +BASE_URI := https://hacknnext.diy NEXTS = $(wildcard nexts/*) +$(OUTDIR)/schema/index.jsonld: schema.yaml + mkdir -p "$(@D)" + gen-jsonld-context --no-mergeimports --base "https://hacknnext.diy/schema#" schema.yaml >"$@" + +$(OUTDIR)/schema/index.ttl: schema.yaml + mkdir -p "$(@D)" + gen-rdf --no-mergeimports schema.yaml >"$@" + $(OUTDIR)/nexts/%/instructions.pdf: nexts/%/instructions.typ nexts/%/next.yaml $(wildcard parts/*/*) $(wildcard templates/*) mkdir -p "$(@D)" typst compile --root . "$<" "$@" -$(OUTDIR)/nexts/%/index.jsonld: nexts/%/next.yaml schema.yaml +$(OUTDIR)/nexts/%/index.jsonld: nexts/%/next.yaml $(OUTDIR)/schema/index.jsonld mkdir -p "$(@D)" - linkml-convert -t json-ld -s schema.yaml -C Next -o "$@" "$<" + linkml-convert -t json-ld -s schema.yaml -C Next -c "$(BASE_URI)/schema/index.jsonld" -o "$@" "$<" -$(OUTDIR)/nexts/%/index.ttl: nexts/%/next.yaml schema.yaml +$(OUTDIR)/nexts/%/index.ttl: nexts/%/next.yaml $(OUTDIR)/schema/index.ttl mkdir -p "$(@D)" linkml-convert -t ttl -s schema.yaml -C Next -o "$@" "$<" diff --git a/schema.yaml b/schema.yaml index 096fde1912166ffc1f7ed31fb3bb7740cbd8d9d9..df69f9d1961e5ca365744cadc69955371eaaa411 100644 --- a/schema.yaml +++ b/schema.yaml @@ -62,17 +62,6 @@ classes: range: integer required: true minimum_value: 1 - Catalog: - tree_root: true - attributes: - nexts: - multivalued: true - inlined_as_list: true - range: Next - parts: - multivalued: true - inlined_as_list: true - range: Part Transition: class_uri: sf:Transition