diff options
author | EuAndreh <eu@euandre.org> | 2020-10-05 21:27:57 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-10-10 14:31:24 -0300 |
commit | a7c4db7e9215694ef6c50debcc0b4e7402265687 (patch) | |
tree | d45b89f1758b34416e5157cb0e7404276c6fa49a /scripts | |
parent | cargo2nix: Use overlay on example (diff) | |
download | euandre.org-a7c4db7e9215694ef6c50debcc0b4e7402265687.tar.gz euandre.org-a7c4db7e9215694ef6c50debcc0b4e7402265687.tar.xz |
Refactor i18n structure, remove layouts, add slides
Yep, this commit is too big big I didn't want to take the trouble of splitting
it now.
- _config.yml translation keys are now simetrical on the entitiy: articles,
pastebins, tils, slides, etc.;
- _posts were moved to _articles: the _posts collection had special treatment in
Jekyll which I wanted to avoid;
- the filtering of entries for the Atom feed is now done inside the
_includes/feed.atom file instead of every feed file;
- all entities are now dealt with using the pluralized name: articles,
pastebins, tils, slides. No more inconsistencies on the key names, they now
should only make sense as the translation value on the dictionary;
- add base reveal.js infrastruture, with Jekyll generating the listing page and
nothing else.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/assert-content.sh | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/scripts/assert-content.sh b/scripts/assert-content.sh index ab11183..8e30aca 100755 --- a/scripts/assert-content.sh +++ b/scripts/assert-content.sh @@ -131,6 +131,19 @@ for til in $(jq -r '.tils[] | @base64' "${JSON}"); do } done +echo Lintins slides... >&2 +for slide in $(jq -r '.slides[] | @base64' "${JSON}"); do + assert-frontmatter "$slide" + DATE="$(get-date "$slide" | awk '{print $1}')" + URL="$(basename "$(get-url "$slide")")" + FILE="_slides/${DATE}-${URL%.html}.html" + + [[ -f "${FILE}" ]] || { + red "date/filename mismatch: '${FILE}' does not exist." + exit 1 + } +done + echo Asserting unique refs... >&2 KNOWN_IDS=() assert-unique-ref() { @@ -153,9 +166,10 @@ assert-unique-ref() { done } -assert-unique-ref "$(jq -r '.pages[] | @base64' "${JSON}")" -assert-unique-ref "$(jq -r '.posts[] | @base64' "${JSON}")" -assert-unique-ref "$(jq -r '.tils[] | @base64' "${JSON}")" +assert-unique-ref "$(jq -r '.pages[] | @base64' "${JSON}")" +assert-unique-ref "$(jq -r '.pastebins[] | @base64' "${JSON}")" +assert-unique-ref "$(jq -r '.posts[] | @base64' "${JSON}")" +assert-unique-ref "$(jq -r '.tils[] | @base64' "${JSON}")" echo Asserting layouts... >&2 assert-layout() { @@ -174,5 +188,6 @@ assert-layout() { assert-layout "$(jq -r '.posts[] | @base64' "${JSON}")" "post" assert-layout "$(jq -r '.pastebins[] | @base64' "${JSON}")" "pastebin" assert-layout "$(jq -r '.tils[] | @base64' "${JSON}")" "til" +assert-layout "$(jq -r '.slides[] | @base64' "${JSON}")" "slide" echo Done. >&2 |