view README-zh.md for Chinese version.
A new MoonBit docs framework based on Sphinx.
-
For Python Environment, execute command
> Python: Create Environment
fornext
usingrequirement.txt
in VSCode, or:python3 -m venv .env source .env/bin/activate pip install -r requirements.txt
-
For building PDF using Latex,
latexmk
needs to be installed:- MacOS:
- install Mactex
- install
latexmk
using TeX Live Utility
- MacOS:
Execute task Watch Document
in VSCode, or:
sphinx-autobuild . ./_build/html
# or sphinx-autobuild -D language='zh_CN' . ./_build/html
Execute task Build Document
in VSCode, or:
make html
python3 -m http.server -d _build/html
For Chinese version:
LANGUAGE="zh_CN" make html
python3 -m http.server -d _build/html
For PDF:
make latexpdf
open ./_build/latex/moonbitdocument.pdf
For Markdown:
pip install sphinx-markdown-builder
make markdown
Execute task Translate Document
in VSCode, or:
make gettext
sphinx-intl update -p _build/gettext -l zh_CN