feat: locale routing (en flat, zh subfolder), language switcher, dark default
Deploy / build (push) Successful in 11s

- Derive lang from folder (posts/zh/* -> zh, else en); remove lang: frontmatter
- Change post route to [...slug] to capture nested zh paths
- Add nav language switcher (EN <-> 中文) + /zh/ landing page
- Default theme to dark (light opt-in via toggle)
- Translate hello-world-zh placeholder into English intro post
- Update case study: docker-compose sample + real install gotchas (commit history)
- Add docs/project-state.md (Tier 1/2/3 backlog)
This commit is contained in:
hoelee committed 2026-09-06 06:37:34 +08:00
1 parent a0b238bc98
commit e0d4b0fbb7
17 files changed
+318 -44

No files matched your search

+3 -1
View File
@@ -18,7 +18,9 @@ const posts = defineCollection({
]),
tags: z.array(z.string()).default([]),
draft: z.boolean().default(false),
lang: z.enum(['en', 'zh']).default('en'),
// lang is NOT set in frontmatter anymore — it's derived from the folder:
// posts/hello-world.md -> en (flat)
// posts/zh/hello-world.md -> zh (subfolder)
ogImage: z.string().optional(),
}),
});