From ec4ebdaf7c720a339252521e6f1032876fcb3683 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 30 Dec 2020 14:04:18 +0100 Subject: Store list of feeds in metadata file --- scripts/build_content.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scripts') 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 () { create_feed=$(echo "$metadata" | jq -r ".create_feed") if [ "$create_feed" = "true" ]; then - feed_target_file="${target_file%.html}.xml" feed_url_abs="$(target_url_abs "$1" "xml")" feed_url_full="${SITE%/}$feed_url_abs" last_update=$(echo "$metadata" | jq -r ".pages.all[0].date") @@ -227,21 +226,21 @@ handle () { } \ } \ }") + fi - echo "$metadata" > "$meta_file" + echo "$metadata" > "$meta_file" + if [ "$create_feed" = "true" ]; then pandoc "$1" \ -f markdown \ -t html5 \ --template "${TEMPLATES_DIR}feed.xml" \ - -o "$feed_target_file" \ + -o "${target_file%.html}.xml" \ --metadata-file metadata/metadata.yaml \ --metadata-file "$meta_file" \ $FILTERS fi - echo "$metadata" > "$meta_file" - pandoc "$1" \ -f markdown \ -t html5 \ -- cgit v1.2.3-70-g09d2