From 8c83a2ef92be845c5ffecb1434028d0c68915936 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 18 Apr 2021 15:44:32 +0200 Subject: Update --- scripts/build_content.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/build_content.sh b/scripts/build_content.sh index c20eca8..83b6908 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh @@ -69,10 +69,10 @@ get_subpages_metadata() { fi local pages="[]" - local sections="{}" + local subsections="{}" for file_in in "${child_pages[@]}"; do - local section=$(basename "${file_in%/index.md}") + local subsection=$(basename "${file_in%/index.md}") local content=$(get_content "$file_in" | sed -z 's/\\/\\\\/g;s/\n/\\n/g;s/"/\\"/g') local metadata=$(get_metadata "$file_in" | jq "{ \ file_out: .file_out, \ @@ -92,10 +92,10 @@ get_subpages_metadata() { fi pages=$(echo "$pages" | jq ". += [ $metadata ]") - sections=$(echo "$sections" | jq ". += { \"$section\": { title: $title, pages: $subpages } }") + subsections=$(echo "$subsections" | jq ". += { \"$subsection\": { title: $title, pages: $subpages } }") done - echo "{ \"pages\": $pages, \"sections\": $sections }" + echo "{ \"pages\": $pages, \"subsections\": $subsections }" } handle () { -- cgit v1.2.3-70-g09d2