summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--scripts/subpages.lua2
2 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ac2fec0..d84b561 100644
--- a/Makefile
+++ b/Makefile
@@ -62,13 +62,16 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \
62 --metadata namespace="$(NAMESPACE)" \ 62 --metadata namespace="$(NAMESPACE)" \
63 --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \ 63 --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \
64 --metadata-file "$@.pages" \ 64 --metadata-file "$@.pages" \
65 $(PANDOC_FILTERS) \
65 -o "$@.meta" "$<" 66 -o "$@.meta" "$<"
66 pandoc \ 67 pandoc \
67 -f markdown-citations \ 68 -f markdown-citations \
68 -t html5 \ 69 -t html5 \
70 --lua-filter scripts/metadata_filter.lua \
69 --lua-filter scripts/subpages.lua \ 71 --lua-filter scripts/subpages.lua \
70 $(GLOBAL_METADATA) \ 72 $(GLOBAL_METADATA) \
71 --metadata namespace="$(NAMESPACE)" \ 73 --metadata-file "$@.meta" \
74 --metadata file_out="$@" \
72 $(PANDOC_FILTERS) \ 75 $(PANDOC_FILTERS) \
73 -o "$@.content" "$<" 76 -o "$@.content" "$<"
74 jq '. + { content: $$content }' --rawfile content "$@.content" "$@.meta" > "$@" 77 jq '. + { content: $$content }' --rawfile content "$@.content" "$@.meta" > "$@"
diff --git a/scripts/subpages.lua b/scripts/subpages.lua
index d77759d..b753b1e 100644
--- a/scripts/subpages.lua
+++ b/scripts/subpages.lua
@@ -4,7 +4,7 @@ local namespace = ''
4local siteUrl = '' 4local siteUrl = ''
5 5
6function meta(meta) 6function meta(meta)
7 namespace = pandoc.utils.stringify(meta.namespace) 7 namespace = pandoc.utils.stringify(meta.namespace.full)
8 siteUrl = pandoc.utils.stringify(meta.site.url):gsub("/$", "") 8 siteUrl = pandoc.utils.stringify(meta.site.url):gsub("/$", "")
9end 9end
10 10