From 03a7b5de1c97bf36bf454d7d3f718e128c19289a Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 17 Dec 2021 17:47:08 +0100 Subject: Fix subpage content for real --- Makefile | 5 ++++- scripts/subpages.lua | 2 +- 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, \ --metadata namespace="$(NAMESPACE)" \ --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \ --metadata-file "$@.pages" \ + $(PANDOC_FILTERS) \ -o "$@.meta" "$<" pandoc \ -f markdown-citations \ -t html5 \ + --lua-filter scripts/metadata_filter.lua \ --lua-filter scripts/subpages.lua \ $(GLOBAL_METADATA) \ - --metadata namespace="$(NAMESPACE)" \ + --metadata-file "$@.meta" \ + --metadata file_out="$@" \ $(PANDOC_FILTERS) \ -o "$@.content" "$<" 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 = '' local siteUrl = '' function meta(meta) - namespace = pandoc.utils.stringify(meta.namespace) + namespace = pandoc.utils.stringify(meta.namespace.full) siteUrl = pandoc.utils.stringify(meta.site.url):gsub("/$", "") end -- cgit v1.2.3-70-g09d2