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/.justfile: Maintainer command entrypoints. Prefer these over hand-written multi-step shell flows when available.document.code-workspace: VSCode tasks and dev shortcuts.
- Prefer
uvfor Python tooling. Do not create ad-hoc virtualenvs unless a task explicitly requires one oruvis unavailable. - Dev server:
just docs-watch(Chinese:just docs-watch-zh) - Build:
just docs-html(Chinese:just docs-html-zh, Japanese:just docs-html-ja)
- Before editing translation catalogs, sync templates first with
just i18n(orjust i18n <locale>). This wrapsmake gettextandsphinx-intl updateso generated i18n entries stay aligned with source docs. - Translate missing strings in
next/locales/zh_CN/LC_MESSAGES/*.po. - If the source string does not need translation, such as code-only content,
leave
msgstrempty. - Commit catalog changes produced by the i18n sync together with the related source or translation change.
- If
#, fuzzyis present and the translation is verified, remove the flag. - Do not use
msgfmtas the default validation command; preferjust i18nfollowed by a Sphinx build.
just check-docs: runs MoonBit example checks undernext/sources/.just check-errors: validates all error-code examples.just check-error 0001: validates one error-code example.- When touching examples under
next/sources/, avoid broadmoon fmtruns that rewrite unrelated files.
- Install/build:
just tour-install && just tour-build && just tour-preview - Dev server:
just tour-dev
- Use conventional commits.