aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_posts/2018-07-17-running-guix-on-nixos.md2
-rw-r--r--_posts/2018-08-01-verifying-npm-ci-reproducibility.md2
-rw-r--r--_posts/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md2
-rw-r--r--_posts/2019-06-02-stateless-os.md2
-rw-r--r--_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md2
-rwxr-xr-xscripts/assert-content.sh11
6 files changed, 16 insertions, 5 deletions
diff --git a/_posts/2018-07-17-running-guix-on-nixos.md b/_posts/2018-07-17-running-guix-on-nixos.md
index e409f3c..08e21f9 100644
--- a/_posts/2018-07-17-running-guix-on-nixos.md
+++ b/_posts/2018-07-17-running-guix-on-nixos.md
@@ -3,7 +3,7 @@ title: Running Guix on NixOS
date: 2018-07-17
layout: post
lang: en
-ref: running-guix-on-nixos
+ref: running-guix-on-nixos-post
---
I wanted to run
Guix on a NixOS machine. Even though the Guix manual explains how to do it
diff --git a/_posts/2018-08-01-verifying-npm-ci-reproducibility.md b/_posts/2018-08-01-verifying-npm-ci-reproducibility.md
index ff983e5..b1ec754 100644
--- a/_posts/2018-08-01-verifying-npm-ci-reproducibility.md
+++ b/_posts/2018-08-01-verifying-npm-ci-reproducibility.md
@@ -3,7 +3,7 @@ title: Verifying "npm ci" reproducibility
date: 2018-08-01
layout: post
lang: en
-ref: veryfing-npm-ci-reproducibility
+ref: veryfing-npm-ci-reproducibility-post
updated_at: 2019-05-22
---
When [npm@5](https://blog.npmjs.org/post/161081169345/v500) came bringing
diff --git a/_posts/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md b/_posts/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md
index a9a605b..458f858 100644
--- a/_posts/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md
+++ b/_posts/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md
@@ -3,7 +3,7 @@ title: Using "youtube-dl" to manage YouTube subscriptions
date: 2018-12-21
layout: post
lang: en
-ref: using-youtube-dl-to-manage-youtube-subscriptions
+ref: using-youtube-dl-to-manage-youtube-subscriptions-post
---
I've recently read the
[announcement](https://www.reddit.com/r/DataHoarder/comments/9sg8q5/i_built_a_selfhosted_youtube_subscription_manager/)
diff --git a/_posts/2019-06-02-stateless-os.md b/_posts/2019-06-02-stateless-os.md
index 2614b44..d1c2793 100644
--- a/_posts/2019-06-02-stateless-os.md
+++ b/_posts/2019-06-02-stateless-os.md
@@ -3,7 +3,7 @@ title: Using NixOS as an stateless workstation
date: 2019-06-02
layout: post
lang: en
-ref: stateless-os
+ref: stateless-os-post
---
Last week[^last-week] I changed back to an old[^old-computer] Samsung laptop, and installed
[NixOS](https://nixos.org/) on it.
diff --git a/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md b/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md
index c13a4db..f1d28ce 100644
--- a/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md
+++ b/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md
@@ -3,7 +3,7 @@ title: Guix inside sourcehut builds.sr.ht CI
date: 2020-08-10
layout: post
lang: en
-ref: guix-sourcehut-ci
+ref: guix-sourcehut-ci-post
---
After the release of the [NixOS images in builds.sr.ht][0] and much
usage of it, I also started looking at [Guix][1] and
diff --git a/scripts/assert-content.sh b/scripts/assert-content.sh
index d83ec33..0642663 100755
--- a/scripts/assert-content.sh
+++ b/scripts/assert-content.sh
@@ -59,6 +59,7 @@ 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"
@@ -67,6 +68,11 @@ 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
@@ -85,7 +91,12 @@ 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