Documentation
Rezi's documentation site is built with MkDocs Material and deployed to GitHub Pages via the docs.yml workflow.
Rezi's documentation site is built with
MkDocs Material and deployed to GitHub
Pages via the docs.yml workflow.
Prerequisites
- Python 3.8+ (for MkDocs)
- npm (for TypeDoc API reference generation)
The helper script scripts/docs.sh manages the Python virtual environment
automatically -- you do not need to create or activate it manually.
Local Development
Start the local development server with live reload:
bash scripts/docs.sh serveThis command performs the following steps:
- Creates a Python virtual environment at
.venv-docs/if it does not exist. - Installs/upgrades dependencies from
requirements-docs.txt. - Runs
npm run docs:apito generate TypeDoc API reference output intoout/typedoc/. - Stages the TypeDoc output into
docs/api/reference/so MkDocs can link-check it. - Starts
mkdocs servewith live reload onhttp://127.0.0.1:8000.
The staged TypeDoc directory is cleaned up automatically when the server stops (via a shell trap).
Production Build
Build the static site for deployment:
bash scripts/docs.sh buildThis runs mkdocs build --strict, which treats all warnings as errors. The
output is written to out/site/. The TypeDoc API reference is included at
out/site/api/reference/.
Python Dependencies
The requirements-docs.txt file pins the MkDocs ecosystem:
mkdocs>=1.6,\<1.7
mkdocs-material>=9.5,\<10
pymdown-extensions>=10.8,\<11If you need to update these versions, edit requirements-docs.txt and re-run
the docs script -- it will reinstall into the existing venv.
Custom Python Path
If python3 is not on your PATH, set the PYTHON environment variable:
PYTHON=/usr/bin/python3.11 bash scripts/docs.sh serveAdding a New Page
To add a new documentation page:
-
Create the Markdown file. Place it in the appropriate directory under
docs/. For example, to add a new widget reference page:docs/widgets/my-widget.md -
Add it to the navigation. Open
mkdocs.ymland add an entry under the appropriate section in thenavkey:nav: - Widgets: - My Widget: widgets/my-widget.md -
Preview locally. Run
bash scripts/docs.sh serveand verify the page appears in the sidebar and renders correctly.
Widget Documentation Template
When documenting a widget, follow this structure:
# Widget Name
Brief description of the widget and its purpose.
## Props
| Prop | Type | Default | Description |
|-----------|----------|---------|-------------|
| `label` | `string` | -- | The label text. |
| `checked` | `boolean`| `false` | Whether the checkbox is checked. |
## Usage
\`\`\`typescript
import { ui } from "@rezi-ui/core";
ui.myWidget({ label: "Example" });
\`\`\`
## Variants / States
Describe visual variants or interactive states.
## Keyboard Interaction
Document keyboard shortcuts if the widget is interactive.
## See Also
- Links to related widgets or concepts.API Reference (TypeDoc)
The API reference is generated from TypeScript source comments using TypeDoc:
npm run docs:apiOutput goes to out/typedoc/. During docs builds, this output is staged into
docs/api/reference/ temporarily so MkDocs can include it in the site and
validate links.
The TypeDoc configuration is in typedoc.json at the repository root.
Deployment
Documentation is deployed automatically by the docs.yml GitHub Actions
workflow. The workflow:
- Checks out the repository.
- Runs
bash scripts/docs.sh buildto produce the static site. - Deploys the
out/site/directory to GitHub Pages.
Deployment is triggered on every push to main, every pull request, and manual
workflow_dispatch. The workflow does not use path filters.
The live site is available at: rezitui.dev