From e16177dd78fbfaba97ee886778375c9f1c28f0cf Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 19 Aug 2020 11:28:07 -0300 Subject: assert-content.sh: Comment sections --- scripts/assert-content.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/assert-content.sh b/scripts/assert-content.sh index 9c7a26a..ab11183 100755 --- a/scripts/assert-content.sh +++ b/scripts/assert-content.sh @@ -5,6 +5,9 @@ end="\033[0m" red="\033[0;31m" red() { echo -e "${red}${1}${end}"; } + +## Constant definitions + JSON="${1:-}" [[ -z "${JSON}" ]] && { red 'Missing input JSON file.' @@ -23,6 +26,12 @@ EOF exit 2 } +LANGS=(en pt fr) +IGNORED_PAGES=(site.json sitemap.xml *.atom) + + +## Helper function definitions + contains-element() { local e match="$1" shift @@ -62,8 +71,8 @@ get-layout() { echo "${1}" | base64 --decode | jq -r .layout } -LANGS=(en pt fr) -IGNORED_PAGES=(site.json sitemap.xml *.atom) + +## Assertions assert-frontmatter() { F="${1}" -- cgit v1.2.3