diff options
author | EuAndreh <eu@euandre.org> | 2020-10-05 10:19:39 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-10-05 10:19:39 -0300 |
commit | 59c19d9922859962d16dc05f8d98881c5269d3b3 (patch) | |
tree | cb32d62b5e2d81ee0c14ac0e2a2e00ccd70fb9d9 /scripts | |
parent | swift2nix post: Use dashes instead of colon on title (diff) | |
download | euandre.org-59c19d9922859962d16dc05f8d98881c5269d3b3.tar.gz euandre.org-59c19d9922859962d16dc05f8d98881c5269d3b3.tar.xz |
assert-content.sh: Check that titles don't contain colons
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/assert-content.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/assert-content.sh b/scripts/assert-content.sh index ab11183..afcf9a0 100755 --- a/scripts/assert-content.sh +++ b/scripts/assert-content.sh @@ -84,6 +84,12 @@ assert-frontmatter() { if ! contains-element "${URL}" "${IGNORED_PAGES[@]}"; then TITLE="$(get-title "$F")" [[ -z "${TITLE}" ]] && fail-attr 'title' "${URL}" + if grep ':' <(echo "$TITLE") > /dev/null; then + echo "Use of forbidden colon ':' on title '$TITLE'" + echo "Colons will make Jekyll create a subdirectory on the final path" + echo "Replace it with a dash '-'" + exit 1 + fi fi if ! contains-element "${LANG}" "${LANGS[@]}"; then |