Permalinks
URLs are the most serious thing about a blog — more serious than design, font, or "comment system" by a factor of ten.
My rules#
- Slug never changes — even if title changes
- No date prefix (
/2024/05/...) — dates shouldn't influence URLs - No
.htmlsuffix —/posts/foo/, not/posts/foo.html - Trailing slash — easier for static hosts (write
dist/posts/foo/index.html) - No query strings —
?utm_source=...never enters my canonical URL
Bilingual mirror#
CN at /posts/<slug>/, EN at /en/posts/<slug>/. Same slug. So [[en/posts/markdown-as-infrastructure]] from any file targets EN; bare [[posts/markdown-as-infrastructure]] targets CN. Simple enough that I don't forget.
Setting up Giscus (the minimal steps)#
(Referenced from elsewhere — capturing it here.)
- Visit https://giscus.app
- Repo name (must be public, Discussions enabled)
- Pick a Discussion category — recommend creating one called "Comments"
- Mapping:
pathname(one URL → one discussion) - Paste the four IDs into
src/lib/site-config.ts
Filled = enabled. Empty = <Comments> returns null, zero build warnings.
Comments
Comments are moderated. No email, no IP collection.