From fd8aa54a4ce623d55219b1865e23b93b3b26e265 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 27 Jul 2022 19:10:15 +0200 Subject: Added draft feature --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6801970..cfc583f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ export DEPLOY_TARGET = vulpes@94.130.78.123:/srv/http/volpeon.ink/ +export MODE = prod -include Env.mk @@ -61,10 +62,11 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \ -t html5 \ --wrap preserve \ --no-highlight \ + --metadata-file "$@.pages" \ --template scripts/metadata.json \ + --metadata mode="$(MODE)" \ --metadata namespace="$(NAMESPACE)" \ --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \ - --metadata-file "$@.pages" \ $(PANDOC_FILTERS) \ -o "$@.meta" "$<" rm "$@.pages" @@ -76,6 +78,7 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \ --lua-filter scripts/subpages.lua \ $(GLOBAL_METADATA) \ --metadata-file "$@.meta" \ + --metadata mode="$(MODE)" \ --metadata file_out="$@" \ $(PANDOC_FILTERS) \ -o "$@.content" "$<" @@ -99,6 +102,7 @@ out/%.html: content/%.md .cache/meta/%.json .cache/assets.json $(CONTENT_TEMPLAT --lua-filter scripts/metadata.lua \ $(GLOBAL_METADATA) \ --metadata-file .cache/assets.json \ + --metadata mode="$(MODE)" \ --metadata-file "$(filter .cache/meta/%.json,$^)" \ --metadata file_out="$@" \ $(PANDOC_FILTERS) \ @@ -117,6 +121,7 @@ out/%.xml: content/%.md .cache/meta/%.json $(FEED_TEMPLATES_SRC) metadata/*.yaml --lua-filter scripts/metadata.lua \ $(GLOBAL_METADATA) \ --metadata-file "$(filter .cache/meta/%.json,$^)" \ + --metadata mode="$(MODE)" \ --metadata file_out="$@" \ $(PANDOC_FILTERS) \ -o "$@" "$<" -- cgit v1.2.3-70-g09d2