Developer documentation for Ungeniuses open-source projects — internals, architecture, and module deep-dives. Built with MkDocs Material.
Live site: https://ungeniuses.github.io/wiki/
- Prerequisites
- Local preview
- Adding a new project
- Adding a new module page
- Writing a module page
- Deployment
- Repo layout
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtmkdocs serveOpen http://localhost:8000. The server watches for file changes and hot-reloads automatically.
-
Create the directory structure:
docs/<project_name>/ index.md ← project landing page architecture.md ← system design roadmap.md ← future plans modules/ index.md ← auto-generated module listYou can copy an existing project folder as a starting point:
cp -r docs/reader.cpp docs/<project_name>
-
Add a nav section in
mkdocs.yml:nav: - Home: index.md - reader.cpp: - ... - <project_name>: # ← add this block - <project_name>/index.md - Architecture: <project_name>/architecture.md - Roadmap: <project_name>/roadmap.md - Modules: - <project_name>/modules/index.md
-
Add a project card to
docs/index.mdin the.wiki-card-gridsection.
Use the scaffolding script — it creates the page and updates mkdocs.yml
automatically:
python scripts/new_module.py <project_name> <module_name>
# With a custom human-readable title:
python scripts/new_module.py <project_name> <module_name> --title "My Module"Examples:
python scripts/new_module.py reader.cpp spsc_ring_buffer
python scripts/new_module.py reader.cpp render_layer --title "Render Layer"
python scripts/new_module.py project_gacha gacha_engine --title "Gacha Engine"The script:
- Creates
docs/<project>/modules/<module_name>.mdfrom the template - Inserts a nav entry under
<project> → Modulesinmkdocs.yml - Adds a link to
docs/<project>/modules/index.md
If the project doesn't exist in nav yet, it creates the full project section.
The template at docs/_templates/module.md
defines the five standard sections:
| Section | What to write |
|---|---|
| Purpose | 1–2 sentences: what this module does and why it exists |
| Location | File path(s) / line refs in the actual repo |
| How it works | The substantive explanation — use sub-headings, diagrams |
| Interfaces with | Links to other module pages it depends on or serves |
| Gotchas / History | Non-obvious decisions, past bugs, why-not-the-obvious |
Module ≠ file. A module is a logical component with a single responsibility. Some modules span multiple files; some files contain only one module. Use judgment per-project — the script only needs a name, not a path.
Deployment is fully automated via GitHub Actions
(.github/workflows/deploy.yml).
Trigger: Every push to main builds the site and pushes to the gh-pages
branch using mkdocs gh-deploy.
One-time repo setup (only needed on first deploy):
- Go to Settings → Pages → Source
- Set Branch:
gh-pages, Folder:/ (root) - Save
After that, every merge to main deploys automatically within ~1 minute.
Manual deploy (from your machine):
mkdocs gh-deploy --force --cleanwiki/
├── docs/
│ ├── index.md # Landing page (lists all projects)
│ ├── assets/
│ │ ├── extra.css # Custom styles (deep purple/amber theme)
│ │ ├── extra.js # Minimal JS enhancements
│ │ └── logo.png # Wiki logo
│ ├── _templates/
│ │ └── module.md # Module page template
│ ├── _overrides/ # MkDocs Material theme overrides (optional)
│ └── <project_name>/
│ ├── index.md # Project landing page
│ ├── architecture.md
│ ├── roadmap.md
│ └── modules/
│ ├── index.md # Module list
│ └── <module_name>.md # One per logical component
├── scripts/
│ └── new_module.py # Scaffolding script
├── .github/
│ └── workflows/
│ └── deploy.yml # CI/CD: build + deploy to GitHub Pages
├── mkdocs.yml # MkDocs + Material configuration
├── requirements.txt # Python dependencies
└── README.md # This file