Contributing to Docs
This guide covers how to add and edit documentation in the Docusaurus site.
Running Locally
cd docs
pnpm install
pnpm start
Opens localhost:3000 with hot-reload. Changes to .md files are reflected immediately.
File Structure
docs/
├── docs/ # Documentation pages (sidebar content)
│ ├── intro.md # Landing page for /docs
│ ├── getting-started/ # Setup guides
│ ├── architecture/ # System design and data models
│ ├── infrastructure/ # CI/CD, deployment, environments
│ ├── development/ # Code patterns and conventions
│ ├── api/ # Generated API reference (do not edit)
│ ├── backend/ # Generated GoDoc for backend (do not edit)
│ ├── contributing/ # Contribution guidelines
│ └── sprint-reviews/ # Sprint reports
├── blog/ # Blog posts
├── src/pages/ # Custom pages (homepage)
└── docusaurus.config.ts # Site configuration
Generated Backend Docs Workflow
The docs/docs/backend/ pages are generated from Go source comments in api/.
When you update exported Go types, functions, methods, or package comments:
- Regenerate backend docs:
cd api
make generate-docs - Verify docs build cleanly:
cd docs
pnpm run build - Commit both source changes and regenerated docs together.
Adding a New Doc Page
-
Create the file in the appropriate directory, e.g.
docs/development/my-topic.md -
Add frontmatter at the top:
---
sidebar_position: 5
---
# My Topic Title
Content goes here. -
Set
sidebar_positionto control ordering within the section (lower = higher in sidebar) -
Link it from
intro.mdin the appropriate section
That's it — the sidebar auto-generates from the filesystem.
Adding a New Section (Folder)
-
Create the folder, e.g.
docs/new-section/ -
Add a
_category_.jsonfile:{
"label": "New Section",
"position": 9
} -
Add your
.mdfiles inside the folder
Adding a Blog Post
-
Create a file in
blog/with the date prefix:blog/2026-03-15-my-post.md -
Add frontmatter:
---
slug: my-post-slug
title: "My Post Title"
authors: [askatlas]
tags: [sprint]
---
First paragraph is the summary shown on the blog index.
<!-- truncate -->
Full content continues here. -
Available tags:
sprint,update,architecture(defined inblog/tags.yml)
Using Mermaid Diagrams
Wrap diagrams in fenced code blocks with the mermaid language:
```mermaid
graph LR
A --> B --> C
```
Supported diagram types: flowcharts, sequence diagrams, ER diagrams, etc. See Mermaid docs.
Building for Production
pnpm run build
This catches broken links and build errors. Always run this before pushing.
Deployment
Docs deploy automatically via GitHub Actions when changes to docs/ are pushed to main. The site is hosted on GitHub Pages.