Context
Unify the library and CLI docs on a single Docusaurus site (ttag.js.org). Right now the CLI lives entirely in README.md in the ttag-cli repo — a user landing on ttag.js.org doesn't see half of the workflow. This is a structural gap that prevents "Getting Started" from ever being clear, no matter how many times we rewrite it.
Blocked by the Docusaurus v3 migration — no point doing sidebar reorg on v1 only to redo it.
A secondary motivation: prepare the ground for an Ecosystem section (msgai, related tools) and "Translation options" in Getting Started.
Target sidebar
ttag.js.org
├── Introduction
│ ├── Why ttag?
│ ├── Getting Started ← rewritten in a separate issue
│ └── Concepts (tagged templates, gettext, .po)
├── Library
│ ├── API (t, ngettext, msgid, c, jt, gettext)
│ ├── React / JSX
│ ├── Plurals & contexts
│ ├── Multi-instance (TTag class, SSR)
│ ├── Configuration (addLocale, useLocale, defaultLang)
│ └── Validation (dev-only)
├── CLI
│ ├── Installation
│ ├── Commands
│ │ ├── extract, check, merge, update
│ │ ├── replace, translate, po2json
│ │ ├── validate, stats, spell
│ │ ├── pseudo, init, filter, color
│ │ └── web (interactive UI)
│ └── Build integration (babel-plugin-ttag, webpack, vite)
├── Babel plugin
│ └── (stub with a link to the repo for now)
└── Ecosystem
├── babel-plugin-ttag
├── msgai (translation via LLM)
└── Related tools (Poedit, Crowdin, Weblate)
Architectural question — source of truth for CLI docs
Two options:
A. CLI docs in ttag-org/ttag-cli, synced into the website
- CLI docs live in
ttag-cli/docs/ as .md
- Website pulls them via git submodule, npm tarball, or a sync script
- README in ttag-cli becomes short, links to ttag.js.org/cli
Pros: SSOT. Updating commands/foo.ts → autogenerate docs/commands/foo.md (via yargs --help parsing) → site updates on next release.
Cons: more setup, two-repo ritual.
B. CLI docs in this repo (website/docs/cli/)
- Everything in one place; sidebar updates are trivial
- README in ttag-cli stays as a full fallback
Pros: simple, no extra infra.
Cons: doc drift — release a CLI 1.12 with a new command and the other repo's docs can lag.
Intuitive recommendation: start with B (faster, lets us validate the structure), then move to A with autogeneration if drift becomes a problem.
Scope
Out of scope
- Rewriting Getting Started — separate issue
- Adding an msgai section — blocked on a separate ecosystem positioning decision; a stub folder is fine
- Moving to another platform (VitePress, Astro Starlight) — separate discussion
Definition of Done
Context
Unify the library and CLI docs on a single Docusaurus site (ttag.js.org). Right now the CLI lives entirely in
README.mdin thettag-clirepo — a user landing on ttag.js.org doesn't see half of the workflow. This is a structural gap that prevents "Getting Started" from ever being clear, no matter how many times we rewrite it.Blocked by the Docusaurus v3 migration — no point doing sidebar reorg on v1 only to redo it.
A secondary motivation: prepare the ground for an Ecosystem section (msgai, related tools) and "Translation options" in Getting Started.
Target sidebar
Architectural question — source of truth for CLI docs
Two options:
A. CLI docs in
ttag-org/ttag-cli, synced into the websitettag-cli/docs/as.mdPros: SSOT. Updating
commands/foo.ts→ autogeneratedocs/commands/foo.md(viayargs --helpparsing) → site updates on next release.Cons: more setup, two-repo ritual.
B. CLI docs in this repo (
website/docs/cli/)Pros: simple, no extra infra.
Cons: doc drift — release a CLI 1.12 with a new command and the other repo's docs can lag.
Intuitive recommendation: start with B (faster, lets us validate the structure), then move to A with autogeneration if drift becomes a problem.
Scope
website/docs/cli/(if B) — initially copies of README sections, then split into pageswebsite/docs/library/— restructure existing pages under the new hierarchywebsite/docs/ecosystem/—babel-plugin-ttag,msgai(placeholder), related toolssidebars.jsredirectsplugin)Out of scope
Definition of Done