Guidance for AI agents working on this documentation site for Mainsail, a 3D printer web interface for Klipper firmware.
Site generator: Zensical
Live site: https://docs.mainsail.xyz | Repo: https://github.com/mainsail-crew/docs
# Setup
pip install -r requirements.txt
# Development server (http://127.0.0.1:8000)
zensical serve
# Build static site (output: site/)
zensical builddocs/
βββ docs/ # Documentation source (Markdown)
β βββ assets/ # Logo, favicon, social images
β βββ images/ # Screenshots organized by section
β βββ stylesheets/ # Custom CSS (custom.css)
β βββ configuration/ # Config guides
β βββ features/ # Feature docs
β βββ setup/ # Installation guides
β βββ crowsnest/ # Webcam daemon docs
β βββ mainsailos/ # OS image docs
β βββ sonar/ # Network detection docs
β βββ index.md # Homepage
βββ overrides/ # Template overrides (custom html_title logic)
βββ agent_docs/ # Detailed guides for AI agents
βββ _data/ # Data files (contributors, licenses, themes)
βββ _scripts/ # Build scripts (credits, themes generation)
βββ zensical.toml # Site config and navigation
βββ requirements.txt # Python deps (zensical)
βββ site/ # Build output (gitignored)
- Markdown files in
docs/with lowercase hyphenated names:my-feature.md - Images in
docs/images/<section>/using.png,.webp, or.avif - Navigation defined in
zensical.tomlundernav
---
title: Short Page Title
description: Brief description for search engines and social cards.
social:
cards_layout_options:
title: Short Social Card Title
---- Write in second person ("you can", "your printer")
- Clear, concise language; explain technical terms
- Start pages with brief introduction
- Numbered lists for step-by-step instructions
- Include screenshots for UI elements
Use consistent terminology when referring to Mainsail UI elements:
| Element | Correct Term | Description |
|---|---|---|
| Settings Dialog | Interface Settings | The dialog opened via the cogs icon |
| Settings Button | cogs icon | Two gear wheels in the top-right corner |
| Settings Sections | e.g., "General", "Macros", "Presets" | Tabs within Interface Settings |
<!-- Correct -->
Open the **Interface Settings** by clicking the **cogs icon** in the top-right corner.
<!-- Incorrect -->
Open the settings by clicking the gear icon in the sidebar.- Create
.mdfile in appropriatedocs/subdirectory - Add frontmatter with title and description
- Add to
zensical.tomlnavigation undernav - Add images to
docs/images/<section>/
Navigation is defined in zensical.toml using TOML array-of-tables syntax:
nav = [
{ "Section" = [
{ "Page Title" = "path/to/page.md" },
{ "Subsection" = [
{ "Nested" = "path/to/nested.md" },
]},
]},
]- Build output (
site/) is gitignored - Deploys via GitHub Pages
Read these when the task requires it:
- Page Title Convention β
titlevshtml_title, sub-project rules - Markdown Guide β images, admonitions, code blocks, tabs
- Zensical Features β theme, extensions, template overrides