diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_content.sh | 8 |
1 files changed, 4 insertions, 4 deletions
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() { | |||
69 | fi | 69 | fi |
70 | 70 | ||
71 | local pages="[]" | 71 | local pages="[]" |
72 | local sections="{}" | 72 | local subsections="{}" |
73 | 73 | ||
74 | for file_in in "${child_pages[@]}"; do | 74 | for file_in in "${child_pages[@]}"; do |
75 | local section=$(basename "${file_in%/index.md}") | 75 | local subsection=$(basename "${file_in%/index.md}") |
76 | local content=$(get_content "$file_in" | sed -z 's/\\/\\\\/g;s/\n/\\n/g;s/"/\\"/g') | 76 | local content=$(get_content "$file_in" | sed -z 's/\\/\\\\/g;s/\n/\\n/g;s/"/\\"/g') |
77 | local metadata=$(get_metadata "$file_in" | jq "{ \ | 77 | local metadata=$(get_metadata "$file_in" | jq "{ \ |
78 | file_out: .file_out, \ | 78 | file_out: .file_out, \ |
@@ -92,10 +92,10 @@ get_subpages_metadata() { | |||
92 | fi | 92 | fi |
93 | 93 | ||
94 | pages=$(echo "$pages" | jq ". += [ $metadata ]") | 94 | pages=$(echo "$pages" | jq ". += [ $metadata ]") |
95 | sections=$(echo "$sections" | jq ". += { \"$section\": { title: $title, pages: $subpages } }") | 95 | subsections=$(echo "$subsections" | jq ". += { \"$subsection\": { title: $title, pages: $subpages } }") |
96 | done | 96 | done |
97 | 97 | ||
98 | echo "{ \"pages\": $pages, \"sections\": $sections }" | 98 | echo "{ \"pages\": $pages, \"subsections\": $subsections }" |
99 | } | 99 | } |
100 | 100 | ||
101 | handle () { | 101 | handle () { |