Document automatic i18n-sync + hire-CTA flow in post-guideline
Deploy / build (push) Successful in 18s

This commit is contained in:
2026-09-06 07:48:11 +08:00
parent e5ec418b9f
commit a031722ec1
+13
View File
@@ -93,3 +93,16 @@ When you finish a difficult piece of work, use this shape — it's simultaneousl
git push origin main && git push github main
```
4. Gitea Actions CI builds and deploys automatically; verify with `curl -I https://blog.hoelee.com/posts/<slug>/` → 200.
## 8. i18n sync — Chinese translation (do this automatically, every post)
The DigiKedai case study established the standard: **flagship `case-studies` posts get a Chinese translation automatically.** When writing or updating a post, apply this flow without being asked:
1. **Translate flagship case studies.** Any `category: case-studies` post gets a Chinese version at `src/content/posts/zh/<same-slug>.md` — **same filename**, so the language switcher auto-links the two (no `translation:` field needed). Do NOT translate `notes`, quick tutorials, or tool roundups unless the user asks.
2. **Keep EN and ZH in sync.** If you edit the English post (add a section, fix a fact, update a link), make the **same edit** to the Chinese version in the same commit. Never let the two versions drift.
3. **Translate the *frontmatter* too** — title and description go to Chinese, but `category`, `tags`, and `pubDate` stay identical to the English post (they're data, not prose).
4. **Code/commands stay in English** inside the Chinese post (see §6) — only the prose around them is translated.
5. **Every case study ends with a hire CTA** (in the post body, not frontmatter): a "Want a bot/this for your business?" section with WhatsApp `+60 12-797 2969`, email `me@hoelee.com`, and `hoelee.com`. This is a business blog — every flagship post doubles as a lead magnet.
6. **Case studies open with a "why it matters" section** (the business benefit: saves money, 24/7, converts browsers, remembers customers) before the technical architecture.
**Verify after build:** the English page links to `/posts/zh/<slug>/` and the Chinese page links back to `/posts/<slug>/` (the auto language-switch).