Getting started¶
Warning
CFA policy requires that publicly-available documentation should only by used for documentation of software, not scientific results or publications.
Tip
If you're migrating from mkdocs, see those instructions.
Enable zensical for your project¶
- Ensure you have at least
docs/index.md. - Copy
zensical.tomlto your repo. Update the block at the top and remove unneeded plugins. - Copy
.github/workflows/docs.yaml. In your repo, set Settings | Pages | Source to GitHub Actions. - Add dependencies.
- At a minimum,
zensical. - We also recommend
mdx-truly-sane-lists. - If you are building python API docs, also
mkdocstrings-python. - You may want to add these to a separate group, for example using
uv add --group docsoruv add --dev.
- At a minimum,
- Ensure that
site/is git-ignored butdocs/is not. - Check that you can
zensical serve. - See the example static page and zensical docs for more information about features like math rendering.
- See the example API docs, which document the toy code in
mkdtemp/.
Migrating from mkdocs¶
The workflow is somewhat different if you are migrating from mkdocs.
uv remove mkdocs mkdocs-material. You may need a--groupargument.uv add zensical mdx-truly-sane-lists. You might want a--groupargument.- Remove
mkdocs.yaml - Copy and update
zensical.toml - Consider deleting
docs/javascript - Update GitHub workflow
- Change the filename
- Change name of the workflow
- Use zensical, not mkdocs
- Update notes in the readme
Interactive tool¶
This repo implements an experimental, interactive tool that automates new zensical setup and mkdocs migration. Run the tool using uv:
uvx --from git+https://github.com/CDCgov/cfa-zensical-template cfadoc
See the API reference for details about the cfadoc package.