Skip to content

Latest commit

 

History

History
70 lines (48 loc) · 1.22 KB

README.md

File metadata and controls

70 lines (48 loc) · 1.22 KB

Next gen moonbit-docs

view README-zh.md for Chinese version.

A new MoonBit docs framework based on Sphinx.

Develop

Install

  • For Python Environment, execute command > Python: Create Environment for next using requirement.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

Development

Execute task Watch Document in VSCode, or:

sphinx-autobuild . ./_build/html
# or sphinx-autobuild -D language='zh_CN' . ./_build/html

Build

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

Update translation template

Execute task Translate Document in VSCode, or:

make gettext
sphinx-intl update -p _build/gettext -l zh_CN