aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xscripts/assert-content.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/assert-content.sh b/scripts/assert-content.sh
index f3681c9..fd017b0 100755
--- a/scripts/assert-content.sh
+++ b/scripts/assert-content.sh
@@ -114,7 +114,7 @@ assert-frontmatter() {
exit 1
}
- if [[ "$DESIRED_LAYOUT" != 'pastebin' ]] && [[ "$LLANG" = 'en' ]]; then
+ if [[ "$PREFIX" != '_pastebins/' ]] && [[ "$LLANG" = 'en' ]]; then
TITLE_SLUG="$(slugify "$TITLE")"
if [[ "$TITLE_SLUG" != "$REF" ]]; then
red "ref isn't the slug of the title."
@@ -131,11 +131,6 @@ assert-frontmatter() {
fi
}
-echo Linting articles... >&2
-for article in $(jq -r '.articles[] | @base64' "${JSON}"); do
- assert-frontmatter "$article" 'post' '_articles/'
-done
-
echo Linting pages... >&2
for page in $(jq -r '.pages[] | @base64' "${JSON}"); do
URL="$(get-url "$page")"
@@ -144,9 +139,14 @@ for page in $(jq -r '.pages[] | @base64' "${JSON}"); do
fi
done
+echo Linting articles... >&2
+for article in $(jq -r '.articles[] | @base64' "${JSON}"); do
+ assert-frontmatter "$article" 'post' '_articles/'
+done
+
echo Linting pastebins... >&2
for pastebin in $(jq -r '.pastebins[] | @base64' "${JSON}"); do
- assert-frontmatter "$pastebin" 'pastebin' '_pastebins/'
+ assert-frontmatter "$pastebin" 'post' '_pastebins/'
done
echo Linting tils... >&2