summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2020-12-30 14:04:18 +0100
committerVolpeon <git@volpeon.ink>2020-12-30 14:04:18 +0100
commitec4ebdaf7c720a339252521e6f1032876fcb3683 (patch)
tree027c7273be6047c08d04c0afe960045b491cfb42 /scripts
parentFixed subtemplate selection in base template (diff)
downloadvolpeon.ink-ec4ebdaf7c720a339252521e6f1032876fcb3683.tar.gz
volpeon.ink-ec4ebdaf7c720a339252521e6f1032876fcb3683.tar.bz2
volpeon.ink-ec4ebdaf7c720a339252521e6f1032876fcb3683.zip
Store list of feeds in metadata file
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_content.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/build_content.sh b/scripts/build_content.sh
index e57cfed..6250fe9 100755
--- a/scripts/build_content.sh
+++ b/scripts/build_content.sh
@@ -213,7 +213,6 @@ handle () {
213 create_feed=$(echo "$metadata" | jq -r ".create_feed") 213 create_feed=$(echo "$metadata" | jq -r ".create_feed")
214 214
215 if [ "$create_feed" = "true" ]; then 215 if [ "$create_feed" = "true" ]; then
216 feed_target_file="${target_file%.html}.xml"
217 feed_url_abs="$(target_url_abs "$1" "xml")" 216 feed_url_abs="$(target_url_abs "$1" "xml")"
218 feed_url_full="${SITE%/}$feed_url_abs" 217 feed_url_full="${SITE%/}$feed_url_abs"
219 last_update=$(echo "$metadata" | jq -r ".pages.all[0].date") 218 last_update=$(echo "$metadata" | jq -r ".pages.all[0].date")
@@ -227,21 +226,21 @@ handle () {
227 } \ 226 } \
228 } \ 227 } \
229 }") 228 }")
229 fi
230 230
231 echo "$metadata" > "$meta_file" 231 echo "$metadata" > "$meta_file"
232 232
233 if [ "$create_feed" = "true" ]; then
233 pandoc "$1" \ 234 pandoc "$1" \
234 -f markdown \ 235 -f markdown \
235 -t html5 \ 236 -t html5 \
236 --template "${TEMPLATES_DIR}feed.xml" \ 237 --template "${TEMPLATES_DIR}feed.xml" \
237 -o "$feed_target_file" \ 238 -o "${target_file%.html}.xml" \
238 --metadata-file metadata/metadata.yaml \ 239 --metadata-file metadata/metadata.yaml \
239 --metadata-file "$meta_file" \ 240 --metadata-file "$meta_file" \
240 $FILTERS 241 $FILTERS
241 fi 242 fi
242 243
243 echo "$metadata" > "$meta_file"
244
245 pandoc "$1" \ 244 pandoc "$1" \
246 -f markdown \ 245 -f markdown \
247 -t html5 \ 246 -t html5 \