diff --git a/docs/post-guideline.md b/docs/post-guideline.md index 906cd85..fb4f55f 100644 --- a/docs/post-guideline.md +++ b/docs/post-guideline.md @@ -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//` → 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/.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//` and the Chinese page links back to `/posts//` (the auto language-switch).