aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/assert-content.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/assert-content.sh b/scripts/assert-content.sh
index d8fe89f..87670ab 100755
--- a/scripts/assert-content.sh
+++ b/scripts/assert-content.sh
@@ -96,6 +96,14 @@ done
echo Linting tils... >&2
for til in $(jq -r '.tils[] | @base64' "${JSON}"); do
assert-frontmatter "$til"
+ DATE="$(get-date "$til" | awk '{print $1}')"
+ URL="$(basename "$(get-url "$til")")"
+ FILE="_tils/${DATE}-${URL%.html}.md"
+
+ [[ -f "${FILE}" ]] || {
+ red "date/filename mismatch: '${FILE}' does not exist."
+ exit 1
+ }
done
echo Asserting unique refs... >&2