未经授权 · Unauthorized

未经授权 · Unauthorized

notes /

Permalinks

2026/03/30 · 1 min read · ●

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 .html suffix/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.)

  1. Visit https://giscus.app
  2. Repo name (must be public, Discussions enabled)
  3. Pick a Discussion category — recommend creating one called "Comments"
  4. Mapping: pathname (one URL → one discussion)
  5. 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.