From 2a9ce387a57100306149ae1998b1c9b0e6871678 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 28 Dec 2020 18:29:55 +0100 Subject: Export pages grouped by year as array instead of object --- scripts/build_content.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build_content.sh b/scripts/build_content.sh index feb3c0d..cf0128b 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh @@ -101,7 +101,8 @@ get_subpages() { collected_metadata=$(echo "$collected_metadata" \ | jq ".all |= (sort_by(.date) | reverse)" \ - | jq ".by_year[] |= (sort_by(.date) | reverse)") + | jq ".by_year[] |= (sort_by(.date) | reverse)" \ + | jq ".by_year |= (to_entries | sort_by(.key) | reverse)") echo "{ \"pages\": $collected_metadata }" | jq . fi -- cgit v1.2.3-70-g09d2