From d9d57b216630b90f0c97399b6d70091f0c35998a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 19 Dec 2020 01:45:00 -0300 Subject: Use 'post' layout for pastebins --- scripts/assert-content.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3