feat: locale routing (en flat, zh subfolder), language switcher, dark default
Deploy / build (push) Successful in 11s
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:
1 parent
a0b238bc98
commit
e0d4b0fbb7
17 files changed
+318
-44
No files matched your search
@@ -26,18 +26,22 @@ Every decision below optimizes for **credibility + discoverability + speed of sh
|
||||
```
|
||||
src/
|
||||
content/
|
||||
posts/ # blog posts (en + zh)
|
||||
posts/ # English posts (flat)
|
||||
zh/ # Chinese posts (subfolder -> /posts/zh/<slug>/)
|
||||
pages/
|
||||
index.astro # homepage
|
||||
posts/[...slug].astro # post template
|
||||
about.astro
|
||||
layouts/
|
||||
BaseLayout.astro
|
||||
lib/
|
||||
lang.ts # derives en/zh from folder path
|
||||
docs/
|
||||
content-guide.md # what to write, what to avoid (READ before writing a post)
|
||||
design-guide.md # what the design must have, what to avoid (READ before touching UI)
|
||||
seo-reference.md # E-E-A-T / name identity, SEO + GEO checklist, syndication
|
||||
ops-runbook.md # pipeline, publish steps, build pitfalls, health checks
|
||||
project-state.md # enhancement backlog (Tier 1/2/3) — work through one by one
|
||||
```
|
||||
|
||||
## Knowledge guides (my rules of thumb)
|
||||
@@ -48,10 +52,11 @@ docs/
|
||||
| [`docs/design-guide.md`](docs/design-guide.md) | Before changing theme, layout, typography, color, or SEO markup. |
|
||||
| [`docs/seo-reference.md`](docs/seo-reference.md) | Before adding posts/`<head>` markup or debugging search visibility. |
|
||||
| [`docs/ops-runbook.md`](docs/ops-runbook.md) | Before debugging CI/CD, deployment, or hosting. |
|
||||
| [`docs/project-state.md`](docs/project-state.md) | To see what's next — the prioritized enhancement backlog. |
|
||||
|
||||
## Write a post
|
||||
|
||||
1. Create `src/content/posts/<slug>.md` with frontmatter (see content guide).
|
||||
1. Create `src/content/posts/<slug>.md` (English) or `src/content/posts/zh/<slug>.md` (Chinese) with frontmatter (see content guide — **no `lang:` field**, it's derived from the folder).
|
||||
2. Push to `main`.
|
||||
3. CI builds and deploys automatically.
|
||||
|
||||
@@ -62,5 +67,7 @@ docs/
|
||||
## Conventions
|
||||
|
||||
- **Repo publishing order:** push to git.hoelee.com (Gitea) first, then GitHub. (My standing convention.)
|
||||
- **Language:** English posts flat in `posts/`; Chinese posts in `posts/zh/`; no Malay.
|
||||
- **Theme:** defaults to dark mode (light is opt-in via the toggle).
|
||||
- **No overclaiming** — especially Web3 (learning projects, not production DeFi).
|
||||
- **Name identity is consistent everywhere:** "Lee Teong Hoe" / "Mr Hoelee" + same photo + same `sameAs` handles across blog, LinkedIn, GitHub, git.hoelee.com.
|
||||
Reference in new issue
Block a user