summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index cfc583f..863fca1 100644
--- a/Makefile
+++ b/Makefile
@@ -44,7 +44,7 @@ static_files: $(STATIC_FILES)
44 44
45.SECONDEXPANSION: 45.SECONDEXPANSION:
46 46
47namespace = $(patsubst %/index,%,$(patsubst %.json,%,$(patsubst $(2)%,%,$(1)))) 47namespace = $(patsubst %/index,%,$(basename $(patsubst $(2)%,%,$(1))))
48 48
49subpages = $(patsubst content/%.md,.cache/meta/%.json, \ 49subpages = $(patsubst content/%.md,.cache/meta/%.json, \
50 $(shell test -d $(patsubst .cache/meta%,content%,$(1)) && find $(patsubst .cache/meta%,content%,$(1)) -maxdepth 1 -type f -name "*.md" ! -name "index.md") \ 50 $(shell test -d $(patsubst .cache/meta%,content%,$(1)) && find $(patsubst .cache/meta%,content%,$(1)) -maxdepth 1 -type f -name "*.md" ! -name "index.md") \
@@ -64,7 +64,6 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \
64 --no-highlight \ 64 --no-highlight \
65 --metadata-file "$@.pages" \ 65 --metadata-file "$@.pages" \
66 --template scripts/metadata.json \ 66 --template scripts/metadata.json \
67 --metadata mode="$(MODE)" \
68 --metadata namespace="$(NAMESPACE)" \ 67 --metadata namespace="$(NAMESPACE)" \
69 --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \ 68 --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \
70 $(PANDOC_FILTERS) \ 69 $(PANDOC_FILTERS) \
@@ -78,8 +77,8 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \
78 --lua-filter scripts/subpages.lua \ 77 --lua-filter scripts/subpages.lua \
79 $(GLOBAL_METADATA) \ 78 $(GLOBAL_METADATA) \
80 --metadata-file "$@.meta" \ 79 --metadata-file "$@.meta" \
81 --metadata mode="$(MODE)" \ 80 --metadata build.mode="$(MODE)" \
82 --metadata file_out="$@" \ 81 --metadata build.file_out="$@" \
83 $(PANDOC_FILTERS) \ 82 $(PANDOC_FILTERS) \
84 -o "$@.content" "$<" 83 -o "$@.content" "$<"
85 jq '. + { content: $$content }' --rawfile content "$@.content" "$@.meta" > "$@" 84 jq '. + { content: $$content }' --rawfile content "$@.content" "$@.meta" > "$@"
@@ -102,9 +101,9 @@ out/%.html: content/%.md .cache/meta/%.json .cache/assets.json $(CONTENT_TEMPLAT
102 --lua-filter scripts/metadata.lua \ 101 --lua-filter scripts/metadata.lua \
103 $(GLOBAL_METADATA) \ 102 $(GLOBAL_METADATA) \
104 --metadata-file .cache/assets.json \ 103 --metadata-file .cache/assets.json \
105 --metadata mode="$(MODE)" \
106 --metadata-file "$(filter .cache/meta/%.json,$^)" \ 104 --metadata-file "$(filter .cache/meta/%.json,$^)" \
107 --metadata file_out="$@" \ 105 --metadata build.mode="$(MODE)" \
106 --metadata build.file_out="$@" \
108 $(PANDOC_FILTERS) \ 107 $(PANDOC_FILTERS) \
109 -o "$@" "$<" 108 -o "$@" "$<"
110 109
@@ -121,8 +120,8 @@ out/%.xml: content/%.md .cache/meta/%.json $(FEED_TEMPLATES_SRC) metadata/*.yaml
121 --lua-filter scripts/metadata.lua \ 120 --lua-filter scripts/metadata.lua \
122 $(GLOBAL_METADATA) \ 121 $(GLOBAL_METADATA) \
123 --metadata-file "$(filter .cache/meta/%.json,$^)" \ 122 --metadata-file "$(filter .cache/meta/%.json,$^)" \
124 --metadata mode="$(MODE)" \ 123 --metadata build.mode="$(MODE)" \
125 --metadata file_out="$@" \ 124 --metadata build.file_out="$@" \
126 $(PANDOC_FILTERS) \ 125 $(PANDOC_FILTERS) \
127 -o "$@" "$<" 126 -o "$@" "$<"
128 127