Build documentation
Preview documentation locally
Section titled “Preview documentation locally”Generate content from source files and start the development server:
just docs-devVisit http://localhost:4321. Changes to markdown files hot-reload automatically.
Build for production
Section titled “Build for production”just docs-buildThe built site goes to docs-site/dist/, ready for deployment.
Available commands
Section titled “Available commands”| Command | Description |
|---|---|
just docs-generate | Generate docs content from docs/ and Python docstrings |
just docs-install | Install documentation site npm dependencies |
just docs-dev | Start development server (port 4321) |
just docs-build | Generate and build for production |
just docs-preview | Preview production build (port 4321) |
How it works
Section titled “How it works”The just docs-generate command runs scripts/generate_docs.py, which:
- Copies markdown files from
docs/todocs-site/src/content/docs/ - Generates API reference from Python docstrings in
src/using lazydocs - Creates the index page from
README.md
The just docs-build command runs generation first, then builds the
optimized static site with Astro Starlight.
Writing documentation
Section titled “Writing documentation”Adding new pages
Section titled “Adding new pages”-
Create a markdown file in the appropriate
docs/subdirectory:tutorials/— step-by-step learning guideshow-to/— task-oriented solutionsreference/— technical specificationsexplanation/— background concepts and design decisions
-
Add frontmatter:
---title: Your Page Titledescription: Brief description for SEO--- -
Run
just docs-generateto copy to the Astro site.
Linking between pages
Section titled “Linking between pages”Use relative paths without .md extension:
See [Getting Started](../../tutorials/getting-started)Troubleshooting
Section titled “Troubleshooting”- Build fails with “lazydocs not found”: Run
just install-dev - Broken links: Ensure markdown links omit the
.mdextension