aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-19 11:28:07 -0300
committerEuAndreh <eu@euandre.org>2020-08-19 11:28:07 -0300
commite16177dd78fbfaba97ee886778375c9f1c28f0cf (patch)
treeb9789b9234ce23e12d6862283759cef1997776db
parentUpdate Guix on sr.ht article: Use make instead of ad-hoc scripts (diff)
downloadeuandre.org-e16177dd78fbfaba97ee886778375c9f1c28f0cf.tar.gz
euandre.org-e16177dd78fbfaba97ee886778375c9f1c28f0cf.tar.xz
assert-content.sh: Comment sections
Diffstat (limited to '')
-rwxr-xr-xscripts/assert-content.sh13
1 files 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}"