Static Docs
A pure-Python static site generator for polished documentation sites — strong typography, left sidebar navigation, right table of contents, client-side full-text search, and live reload in dev mode.
Features
- Python-only runtime — no Node or frontend build step
- TOML-based configuration — single
site.tomlcontrols everything - YAML navigation — explicit sidebar order, nested groups, top-bar links
- Front matter — YAML (
---) or TOML (+++) blocks for title, summary, draft, order, and template overrides - Pymdown-powered Markdown — Python-Markdown plus
pymdown-extensionsfor richer Markdown behavior - Syntax highlighting — Pygments-powered fenced code blocks
- Table of contents — auto-generated per page, scroll-synced right panel
- Client-side search — full-text index baked into each page at build time
- Live reload dev server — watches content and config files, pushes reload via polling
- GitHub Pages deploy — one command builds and force-pushes to
gh-pages - Theme overrides — drop custom CSS/JS or a full HTML template into
theme/
Installation
From PyPI
pip install static-docs
From source (local / contributor)
git clone https://github.com/Dev-kitx/static-docs.git
cd static-docs
uv sync --locked --extra dev
The project uses uv.lock for repeatable contributor and CI installs. The static-docs command is available through uv run static-docs.
Quick start
# 1. Scaffold a new project
static-docs init my-docs
# 2. Preview with live reload
static-docs preview --config my-docs/site.toml
# 3. Build for production
static-docs build --config my-docs/site.toml
The scaffolded directory contains:
my-docs/
├── site.toml # site-wide config
├── navigation.yml # sidebar + top-bar nav
└── content/
└── index.md # home page
Project documentation
This repository includes a full Static Docs documentation site under docs/.
static-docs build --config docs/site.toml
The docs source explains configuration, authoring, components, API docs generation, search, SEO, LLM files, and GitHub Actions deployment.
CLI reference
All commands follow the pattern:
static-docs <command> [options]
init
Scaffold a new project directory.
static-docs init [path]
| Argument | Default | Description |
|---|---|---|
path |
. |
Directory to initialise. Created if it does not exist. |
build
Build the site to output_dir (configured in site.toml).
static-docs build --config <path/to/site.toml>
| Flag | Default | Description |
|---|---|---|
--config |
site.toml |
Path to the site configuration file. |
preview / serve
Start a local dev server with live reload. Both names are equivalent.
static-docs preview --config <path/to/site.toml> [--host HOST] [--port PORT]
| Flag | Default | Description |
|---|---|---|
--config |
site.toml |
Path to the site configuration file. |
--host |
127.0.0.1 |
Network interface to bind. |
--port |
8000 |
Port to listen on. |
publish
Copy the built output to a publish destination.
static-docs publish --config <path/to/site.toml> [--destination DIR]
| Flag | Default | Description |
|---|---|---|
--config |
site.toml |
Path to the site configuration file. |
--destination |
output_dir from config |
Override the target directory for this run. |
gh-deploy
Build, add GitHub Pages artifacts (.nojekyll, 404.html), and force-push to a deploy branch.
static-docs gh-deploy --config <path/to/site.toml> [--remote REMOTE] [--branch BRANCH] [--message MSG]
| Flag | Default | Description |
|---|---|---|
--config |
site.toml |
Path to the site configuration file. |
--remote |
origin |
Git remote to push to. |
--branch |
gh-pages |
Branch to force-push the output to. |
--message |
Deploy static-docs site |
Commit message for the deploy commit. |
Configuration (site.toml)
[site]
title = "My Docs"
description = "Documentation for My Project"
base_url = "https://your-org.github.io/your-repo/"
output_dir = "dist"
[brand]
name = "My Project"
[theme]
name = "static-docs"
[nav]
file = "navigation.yml"
Navigation (navigation.yml)
- title: Overview
page: index.md
- title: Guides
items:
- page: docs/getting-started.md
- page: docs/configuration.md
- navigation-bar:
github:
title: GitHub
link: https://github.com/your-org/your-repo
logo: https://github.githubassets.com/favicons/favicon.svg
resources:
title: Resources
items:
- name: Release notes
link: https://example.com/releases
- issues:
title: Issues
link: https://github.com/your-org/your-repo/issues
Each nav item supports: title, page, url, items, order.
navigation-bar.githubrenders as a dedicated icon link in the top-right header.- Other
navigation-barentries render to the left of the search bar. issues.linkpopulates the "Give us feedback" link in the right-side TOC panel.
Front matter
YAML (---) or TOML (+++) at the top of any .md file:
---
title: Architecture
nav_title: System Design
order: 4
summary: Explains the pipeline and page rendering model.
template: page.html
draft: false
---
| Field | Description |
|---|---|
title |
Page <title> and <h1> (overrides first # heading). |
nav_title |
Shorter label used only in the sidebar. |
order |
Integer sort key within a navigation group. |
summary |
Used in <meta description> and search results. |
template |
Select an alternate template from theme/templates/. |
draft |
Set true to exclude from the build output. |
Theme
Static Docs includes one built-in docs theme:
[theme]
name = "static-docs"
Repository layout
static-docs/
├── src/staticnest/ # package source
│ ├── cli.py # argparse entry point
│ ├── site.py # build / publish / deploy orchestration
│ ├── markdown.py # Python-Markdown/pymdown renderer
│ ├── theme.py # CSS, JS, and HTML template
│ ├── devserver.py # live-reload HTTP server
│ └── scaffold.py # init command scaffolding
├── docs/ # documentation site source
│ ├── content/
│ ├── navigation.yml
│ └── site.toml
├── tests/ # pytest test suite
├── uv.lock # locked development and CI dependencies
├── pyproject.toml
└── README.md
Local development
Run the documentation site
uv run static-docs preview --config docs/site.toml
Open http://127.0.0.1:8000 in your browser. The server rebuilds and reloads automatically when you save a file.
Run tests
uv sync --locked --extra dev
uv run pytest
Releasing
Releases are automated through the shared Dev-kitx release workflow and PyPI Trusted Publishing. Publishing a GitHub Release triggers the PyPI workflow automatically.
To verify a release artifact locally before publishing, maintainers can build with:
uv sync --locked --extra dev
uv build
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file static_docs-0.3.0.tar.gz.
File metadata
- Download URL: static_docs-0.3.0.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdda953b1173960bdc0980c0732f047b2ce79deea3e319c84a9ffcd8d00bd9c0
|
|
| MD5 |
dabbeed2a00af88e960af3556598c67a
|
|
| BLAKE2b-256 |
2e0e9f3d16c5a3a344296c3ebabc0962332c70433b32a0de83916279b112675a
|
Provenance
The following attestation bundles were made for static_docs-0.3.0.tar.gz:
Publisher:
publish.yml on Dev-kitx/static-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
static_docs-0.3.0.tar.gz -
Subject digest:
cdda953b1173960bdc0980c0732f047b2ce79deea3e319c84a9ffcd8d00bd9c0 - Sigstore transparency entry: 2490961772
- Sigstore integration time:
-
Permalink:
Dev-kitx/static-docs@cc8228695dc00b32b3098a6dc7cd43b3107942fd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Dev-kitx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cc8228695dc00b32b3098a6dc7cd43b3107942fd -
Trigger Event:
release
-
Statement type:
File details
Details for the file static_docs-0.3.0-py3-none-any.whl.
File metadata
- Download URL: static_docs-0.3.0-py3-none-any.whl
- Upload date:
- Size: 934.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de6b5c4d0c6f32f3cfe3cb5e5e2f88c2e0592870122bd8667d4c1440b1c5a381
|
|
| MD5 |
82daa8231952bb5b71581f18cb15bab5
|
|
| BLAKE2b-256 |
969eec85ef992d8b27ef21fad99cf04ecf8a41d46f809e7c2473fa1a07bc2ea7
|
Provenance
The following attestation bundles were made for static_docs-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on Dev-kitx/static-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
static_docs-0.3.0-py3-none-any.whl -
Subject digest:
de6b5c4d0c6f32f3cfe3cb5e5e2f88c2e0592870122bd8667d4c1440b1c5a381 - Sigstore transparency entry: 2490961810
- Sigstore integration time:
-
Permalink:
Dev-kitx/static-docs@cc8228695dc00b32b3098a6dc7cd43b3107942fd -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Dev-kitx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cc8228695dc00b32b3098a6dc7cd43b3107942fd -
Trigger Event:
release
-
Statement type: