mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-18 09:22:53 +00:00
Migrate legacy Zola posts into content/writings/ (additive)
scripts/migrate-posts-to-writings.mjs converts all 20 posts under
content/posts/ into the new writings schema — normalizes dates to
bare TOML local-dates, converts the one unambiguous Zola shortcode in
use (youtube embeds) to a plain <iframe>, and strips the now-meaningless
{% raw %}/{% endraw %} escape tags. content/posts/ itself is untouched;
this only adds content/writings/*.
Also generates 301 redirects from the old /posts/<slug>/ URLs to the
new /writings/<slug>/ ones into sws.toml, inside marker comments so
re-running the script regenerates that block idempotently instead of
duplicating it.
Two posts (from-c-to-machine-code, self-hosting-gitea-and-mirroring-github)
use note/tip/warning/danger callout shortcodes that have no Astro
equivalent yet — flagged by the script rather than guessed at, since
that needs a real component once the design system exists.
Verified: astro check clean, full site builds (80 pages, all real
migrated posts render), redirect generation confirmed idempotent
across repeated runs.
This commit is contained in:
@@ -19,3 +19,106 @@ kind = 301
|
||||
source = "/index.xml"
|
||||
destination = "/rss.xml"
|
||||
kind = 301
|
||||
|
||||
# BEGIN migrated-posts-redirects (generated by scripts/migrate-posts-to-writings.mjs)
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/a-fresh-coat-of-paint/"
|
||||
destination = "/writings/a-fresh-coat-of-paint/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/file-over-app/"
|
||||
destination = "/writings/file-over-app/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/from-c-to-machine-code/"
|
||||
destination = "/writings/from-c-to-machine-code/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/generate-django-secret-key/"
|
||||
destination = "/writings/generate-django-secret-key/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/hello-world/"
|
||||
destination = "/writings/hello-world/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/inertia/"
|
||||
destination = "/writings/inertia/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/install-postgresql-15-on-arch-manjaro-garuda-linux/"
|
||||
destination = "/writings/install-postgresql-15-on-arch-manjaro-garuda-linux/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/integrating-netlify/"
|
||||
destination = "/writings/integrating-netlify/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/javascript-exporting-modules/"
|
||||
destination = "/writings/javascript-exporting-modules/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/mmuctf2025/"
|
||||
destination = "/writings/mmuctf2025/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/obsidian-sync/"
|
||||
destination = "/writings/obsidian-sync/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/scriptctf2025/"
|
||||
destination = "/writings/scriptctf2025/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/self-hosting-gitea-and-mirroring-github/"
|
||||
destination = "/writings/self-hosting-gitea-and-mirroring-github/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/semantic-version-and-conventional-commits/"
|
||||
destination = "/writings/semantic-version-and-conventional-commits/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/subresource-integrity/"
|
||||
destination = "/writings/subresource-integrity/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/the-single-byte-that-kills-your-exploit-understanding-endianness/"
|
||||
destination = "/writings/the-single-byte-that-kills-your-exploit-understanding-endianness/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/utterances-comments/"
|
||||
destination = "/writings/utterances-comments/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/vuejs-tailwind/"
|
||||
destination = "/writings/vuejs-tailwind/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/what-is-pwn/"
|
||||
destination = "/writings/what-is-pwn/"
|
||||
kind = 301
|
||||
|
||||
[[advanced.redirects]]
|
||||
source = "/posts/wifi-hotspot-arch/"
|
||||
destination = "/writings/wifi-hotspot-arch/"
|
||||
kind = 301
|
||||
|
||||
# END migrated-posts-redirects
|
||||
|
||||
Reference in New Issue
Block a user