aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-12-19 01:45:00 -0300
committerEuAndreh <eu@euandre.org>2020-12-19 03:21:06 -0300
commitd9d57b216630b90f0c97399b6d70091f0c35998a (patch)
tree8be5fcf0b03ce31f90ed86a59bdbc3584439b6b9 /scripts
parentAdd some categories to existing pastebins (diff)
downloadeuandre.org-d9d57b216630b90f0c97399b6d70091f0c35998a.tar.gz
euandre.org-d9d57b216630b90f0c97399b6d70091f0c35998a.tar.xz
Use 'post' layout for pastebins
Diffstat (limited to 'scripts')
-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