pip install -r docs/requirements.txtyarn installyarn build:libs
- TypeScript docs:
mkdocs serve -f docs/mkdocs-ts.yaml - Python docs:
mkdocs serve -f docs/mkdocs-python.yaml
- TypeScript:
yarn workspace @human-protocol/sdk build:doc
mike deploy -F ./docs/mkdocs-ts.yaml --deploy-prefix docs/ts [VERSION]
mike set-default -F ./docs/mkdocs-ts.yaml --deploy-prefix docs/ts [VERSION] - Python:
mike deploy -F ./docs/mkdocs-python.yaml --deploy-prefix docs/python [VERSION]
mike set-default -F ./docs/mkdocs-python.yaml --deploy-prefix docs/python [VERSION]
Checkout branch gh-pages. If there are any uncommitted files, discard those changes and push any pending commits.
- TypeScript:
mike delete -F ./docs/mkdocs-ts.yaml --deploy-prefix docs/ts [VERSION] - Python:
mike delete -F ./docs/mkdocs-python.yaml --deploy-prefix docs/python [VERSION]
- If you edit
docs/index.html, apply the change both on your working branch and ongh-pages.
NEVER MERGE THE BRANCHES: gh-pages only contains docs builds, not the monorepo code.
- Serve only
index.html(SDK docs won’t load): fromdocs/, run
python -m http.server 8080 --bind 127.0.0.1 - Serve the full published docs: create a mike deployment, switch to the
gh-pagesbranch, go todocs/, then run
python -m http.server 8080 --bind 127.0.0.1
docs/index.html: Static landing page that links to SDK docs (TS/Python).docs/mkdocs-ts.yaml: MkDocs config for the TypeScript site (deploys underdocs/tsvia mike).docs/mkdocs-python.yaml: MkDocs config for the Python site (deploys underdocs/pythonvia mike).docs/ts/: TypeScript site output; versioned builds live underdocs/ts/<version>with per-version assets indocs/ts/<version>/assets/.docs/python/: Python site output (if published); versioned builds live underdocs/python/<version>.docs/overrides/: Shared MkDocs theme overrides and assets (logo/header partials and images).