Source of the static documentation for the MuscleLib API (landing page + docs), with support for multiple languages and light/dark themes.
The build process generates final files in dist/, ready for deployment or to be copied into another project.
docs/templates/– HTML templates (with placeholders)docs/content/<lang>/ui.json– short texts (labels, titles, etc.)docs/content/<lang>/terms.mdanddocs/content/<lang>/privacy.md– long-form content (Markdown)docs/page/– assets (CSS/JS/images/404.html)tools/build.js– build script that compiles content + templates and generatesdist/<lang>/...dist/– generated output
{{t:my.key}}– fetches a string fromui.json{{var}}– simple variable (e.g.lang,github_url){{{raw}}}– raw HTML (e.g.termsandprivacyconverted from Markdown)
If a key does not exist, it appears as [[my.key]] in the generated HTML to make review easier.
- Node.js 18+ (recommended)
- npm
npm install
npm run buildOpen dist/en/index.html (or dist/pt/index.html), or serve dist/ with a static server:
npx serve dist
# or
python -m http.server -d distTip: the build also generates dist/index.html and dist/docs/index.html as redirects to the English version, and dist/404.html for the error page.
The deployment is fully static, and vercel.json defines:
outputDirectory:dist- rewrites for friendly routes (
/,/docs,/pt/docs, etc.)
- Edit templates in
docs/templates/ - Update texts in
docs/content/enanddocs/content/pt - Run
npm run buildto validate the output indist/