aboutsummaryrefslogtreecommitdiff
path: root/scripts/assert-content.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-12 08:30:06 -0300
committerEuAndreh <eu@euandre.org>2020-08-12 08:30:06 -0300
commit13d7ebf1b64f77701e7c77aa3c9247099beb75fd (patch)
treeecb38ad12113d217c918e88af3bf9b03a3b7a2c7 /scripts/assert-content.sh
parentRemove empty TODOs.org (diff)
downloadeuandre.org-13d7ebf1b64f77701e7c77aa3c9247099beb75fd.tar.gz
euandre.org-13d7ebf1b64f77701e7c77aa3c9247099beb75fd.tar.xz
Revert "Assert all post refs end with '-post' and TIL refs end with -til"
This reverts commit e0db9261ea31c38ea5b6de4246d9f651920443a0. Now instead of having such restriction in name of separate "namespaces" for posts and TILs, I'd rather have more meaninful names for each entry. If this doesn't work on the long run (like being hard coming up with enw names) I can add this restriction again.
Diffstat (limited to 'scripts/assert-content.sh')
-rwxr-xr-xscripts/assert-content.sh11
1 files changed, 0 insertions, 11 deletions
diff --git a/scripts/assert-content.sh b/scripts/assert-content.sh
index 0642663..d83ec33 100755
--- a/scripts/assert-content.sh
+++ b/scripts/assert-content.sh
@@ -59,7 +59,6 @@ assert-frontmatter() {
echo Linting posts... >&2
for post in $(jq -r '.posts[] | @base64' "${JSON}"); do
assert-frontmatter "$post"
- REF="$(get-ref "$post")"
DATE="$(get-date "$post" | awk '{print $1}')"
URL="$(basename "$(get-url "$post")")"
FILE="_posts/${DATE}-${URL%.html}.md"
@@ -68,11 +67,6 @@ for post in $(jq -r '.posts[] | @base64' "${JSON}"); do
red "date/filename mismatch: '${FILE}' does not exist."
exit 1
}
-
- grep '\-post$' <(echo "${REF}") > /dev/null || {
- red "ref '${REF}' doesn't end with '-post'."
- exit 1
- }
done
echo Linting pages... >&2
@@ -91,12 +85,7 @@ done
echo Linting tils... >&2
for til in $(jq -r '.tils[] | @base64' "${JSON}"); do
- REF="$(get-ref "$til")"
assert-frontmatter "$til"
- grep '\-til$' <(echo "${REF}") > /dev/null || {
- red "ref '${REF}' doesn't end with '-til'."
- exit 1
- }
done
echo Asserting unique refs... >&2