A custom Python static site generator for polished documentation websites.
Project description
Staticnest
staticnest is a custom Python static site generator built for documentation sites with a polished docs-first visual style: strong typography, left navigation, right table of contents, responsive docs shell, and client-side search.
Features
- Pure Python generator with no runtime framework dependency
- TOML-based site configuration
- YAML navigation file for explicit sidebar order and sections
- Front matter for page metadata, summaries, template choice, draft state, and nav ordering
- Markdown support for headings, paragraphs, lists, blockquotes, fenced code blocks, and links
- Heading-based table of contents
- Responsive theme with mobile navigation and in-page search
- Local dev server with rebuild-on-change and live reload
- CLI preview and publish commands
- One built-in
nesttheme - User template and asset overrides from
theme/
Repository layout
This repository now contains two separate things:
- the
staticnestpackage itself - an example site in examples/docs-site
Project layout
.
└── src/staticnest/
Example site layout:
examples/docs-site/
├── content/
├── navigation.yml
└── site.toml
Run locally
Create a new docs project:
python3 build.py init my-docs
That scaffolds:
site.tomlnavigation.ymlcontent/
Then build it:
python3 build.py build --config my-docs/site.toml
Or preview it locally:
python3 build.py preview --config my-docs/site.toml --host 127.0.0.1 --port 8000
You can also initialize the current directory with:
python3 build.py init
For the bundled example site in this repository:
python3 build.py build --config examples/docs-site/site.toml
For local development:
python3 build.py preview --config examples/docs-site/site.toml --host 127.0.0.1 --port 8000
To publish the final output:
python3 build.py publish --config examples/docs-site/site.toml
To deploy to GitHub Pages:
python3 build.py gh-deploy --config examples/docs-site/site.toml
If you prefer the console script after installation:
pip install -e .
staticnest build --config examples/docs-site/site.toml
The example site's generated output is written to examples/docs-site/dist.
Author content
Create .md files inside content/. The first # Heading becomes the page title unless front matter overrides it.
Navigation
Sidebar navigation comes from navigation.yml, not from the file tree.
- title: Overview
page: index.md
- title: Guides
items:
- page: docs/getting-started.md
- page: docs/configuration.md
Each navigation item can use:
titlepageurlitemsorder
You can also configure the top header navigation in the same file:
- 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
- name: Roadmap
link: https://example.com/roadmap
- issues:
title: Issues
link: https://github.com/your-org/your-repo/issues
The built-in theme treats navigation-bar.github as a dedicated top-right logo link, not a center navigation item. Other navigation-bar entries render just to the left of search. Add:
titlefor the accessible label and text fallbacklinkfor the GitHub destinationlogofor the image shown in the headeraltfor custom image alt text if needed
If you add a top-level issues.link, the built-in theme uses it for the Question? Give us feedback link in the right-side table of contents.
Front matter
Use either YAML-style --- blocks or TOML-style +++ blocks at the top of a page.
---
title: Architecture
nav_title: System Design
order: 4
summary: Explain the pipeline and page rendering model.
template: page.html
draft: false
---
Supported fields:
titlenav_titleordersummarytemplatedraft
Theme overrides
The soft launch ships with one built-in theme:
[theme]
name = "nest"
Optional advanced overrides can still be added with [theme].dir:
[theme]
name = "nest"
dir = "theme"
If [theme].dir is set, the generator will:
- copy
theme/assets/*intodist/assets/ - auto-load
theme/assets/custom.css - auto-load
theme/assets/custom.js - use
theme/templates/page.htmlas the outer shell override - use
template: <name>.htmlin front matter to select other templates
The CLI does not scaffold theme/ by default because the built-in nest theme is bundled with the package. A local theme/ directory is only needed for advanced overrides.
Publish workflow
publish uses the configured output_dir by default. If you want a different destination for a specific run, pass --destination.
gh-deploy builds the site, ensures GitHub Pages artifacts like .nojekyll and 404.html exist, and force-pushes the output to a gh-pages branch. It expects to run inside a Git repository with a configured remote.
Project details
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 staticnest_cli-0.1.4.tar.gz.
File metadata
- Download URL: staticnest_cli-0.1.4.tar.gz
- Upload date:
- Size: 45.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80a32c586680425847f38af3c645094dd42b2fa7ba7d861971ecdfa14b90d40f
|
|
| MD5 |
6268cfc0be1ea1b482545ada58bb110b
|
|
| BLAKE2b-256 |
0e99fca6bebc59d99b27653ea7c09a8157e6ceae3852efb02462338d74015ef9
|
Provenance
The following attestation bundles were made for staticnest_cli-0.1.4.tar.gz:
Publisher:
publish.yml on Dev-kitx/staticnest-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
staticnest_cli-0.1.4.tar.gz -
Subject digest:
80a32c586680425847f38af3c645094dd42b2fa7ba7d861971ecdfa14b90d40f - Sigstore transparency entry: 1108268262
- Sigstore integration time:
-
Permalink:
Dev-kitx/staticnest-cli@ac5b3e4c9c881cdb3091cd8b61d5a3448fd03590 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Dev-kitx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac5b3e4c9c881cdb3091cd8b61d5a3448fd03590 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file staticnest_cli-0.1.4-py3-none-any.whl.
File metadata
- Download URL: staticnest_cli-0.1.4-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e76423c8c20bc4ee2b4882022803f662f40b148598f8dce2b0f047fdbdfb0a46
|
|
| MD5 |
8e598964017bb2c0fc696de9f34280e0
|
|
| BLAKE2b-256 |
286b3283a6cc443b456a6ccd29a26451626df1c37b0d74e69c0650ea35f19e96
|
Provenance
The following attestation bundles were made for staticnest_cli-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on Dev-kitx/staticnest-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
staticnest_cli-0.1.4-py3-none-any.whl -
Subject digest:
e76423c8c20bc4ee2b4882022803f662f40b148598f8dce2b0f047fdbdfb0a46 - Sigstore transparency entry: 1108268264
- Sigstore integration time:
-
Permalink:
Dev-kitx/staticnest-cli@ac5b3e4c9c881cdb3091cd8b61d5a3448fd03590 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Dev-kitx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac5b3e4c9c881cdb3091cd8b61d5a3448fd03590 -
Trigger Event:
workflow_dispatch
-
Statement type: