aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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}"