Documentation navigation
Anybuild documentation

MkDocs

Build Python-based MkDocs documentation and serve the generated site.

Detection

MkDocs is detected from mkdocs.yml or mkdocs.yaml, or from an explicit MkDocs build command. Anybuild also loads Python dependency information and adds MkDocs when the project does not already declare it.

Python and output

The provider uses the Python builder and uv, writes the generated documentation to site by default, and passes that artifact to the shared static deploy runner.

Configuration

MkDocs inherits all configuration from the Python provider configuration and the Static Files provider configuration. In addition, it supports the following provider-specific option.

VariablePurposeExample value
ANYBUILD_MKDOCS_VERSIONSelect the MkDocs version.1.6.1
Anybuild
load("//anybuild/tools:mkdocs.bzl", "mkdocs_build", "mkdocs_config")load("//anybuild/tools:staticfile.bzl", "staticfile_serve")
config = mkdocs_config(    schema = 1,    python_extra_dependencies = ["mkdocs"],    python_version = "3.13",    uv_version = "0.8.15",    sws_version = "2.38.0",)
build = mkdocs_build(config)
staticfile_serve(config, build, name = "site")