This docs site
These pages are a Docusaurus app. Source and publish paths matter for Netlify.
Layout
| Path | Role |
|---|---|
website/devdocs/ | Docusaurus source (Markdown, config, sidebar) |
website/docs/ | Built static output (generated; not edited by hand) |
website/scripts/sync-docs.js | Builds the app and copies devdocs/build → website/docs |
| Public URL | https://toern.live/docs/ (baseUrl = /docs/) |
The app lives under website/ on purpose: Netlify’s build base directory is website, so a repo-root sibling like ../devdocs is outside the tree and fails the cloud build. Keeping sources at website/devdocs fixes that.
Most of website/ stays local/deploy-only (gitignored). Exceptions are tracked so Netlify can build /docs:
website/devdocs/**website/package.json/package-lock.jsonwebsite/scripts/**website/netlify.toml
Local preview
cd website/devdocs
npm install
npm start
Open the URL printed in the terminal (paths are under /docs/…).
Production build (same as Netlify)
From the website package:
cd website
npm run build:docs
That runs node scripts/sync-docs.js --build, which:
npm install+npm run buildinsidewebsite/devdocs- Copies the Docusaurus
build/folder towebsite/docs/
A full site build (npm run build in website/) includes build:docs as the last step.
Editing content
- Edit Markdown under
website/devdocs/docs/ - Sidebar order:
website/devdocs/sidebars.js - Site config /
baseUrl:website/devdocs/docusaurus.config.js - Preview with
npm start, then commit the source underwebsite/devdocs/(not the generatedwebsite/docs/output)
Related
- Operator handbook (device usage): repo
handbook// site/handbook/ - Firmware sketch: repo root
toern.ino+toern_*.ino