This repo hosts MoonBit documentation. It includes the Sphinx-based docs site and an interactive language tour.
next/: Sphinx docs. Sources are Markdown files undernext/plus examples innext/sources/. Translation catalogs live innext/locales/zh_CN/LC_MESSAGES/.moonbit-tour/: Interactive tour web app (pnpm-based).legacy/: Legacy docs/examples.scripts/: Repo-level checks for MoonBit examples undernext/sources/.document.code-workspace: VSCode tasks and dev shortcuts.
- Install deps:
python3 -m venv .env && source .env/bin/activate && pip install -r next/requirements.txt - Dev server:
cd next && ./autobuild.shorsphinx-autobuild . ./_build/html - Build:
cd next && make html(Chinese:LANGUAGE=zh_CN make html)
- Update templates:
cd next && make gettextthensphinx-intl update -p _build/gettext -l zh_CN - Translate missing strings in
next/locales/zh_CN/LC_MESSAGES/*.po. - AI helper:
python3 next/scripts/translate_po_ai.py(requiresOPENAI_API_KEY). - If
#, fuzzyis present and the translation is verified, remove the flag.
python3 scripts/check-document.py: runs MoonBit example checks undernext/sources/.python3 next/check_error_docs.py all: validates error-code examples.
- Install/build:
cd moonbit-tour && pnpm install && pnpm build && pnpm preview - Dev server:
cd moonbit-tour && pnpm dev