GreatDocs.build()

Build the documentation site.

Usage

Source

GreatDocs.build(
    watch=False, refresh=True, version_tags=None, latest_only=False
)

Generates API reference pages followed by quarto render. By default, re-discovers package exports and updates the API reference configuration before building.

Note

In practice, you would normally use the great-docs build CLI command rather than calling this method directly. See the CLI reference for details.

Parameters

watch: bool = False

If True, watch for changes and rebuild automatically.

refresh: bool = True

If True (default), re-discover package exports and update API reference config before building. Set to False for faster rebuilds when your package API hasn’t changed.

version_tags: list[str] | None = None

If provided, only build these specific version tags (for multi-version sites). Ignored when no versions: config is present.

latest_only: bool = False
If True, build only the latest version (skip historical versions). Ignored when no versions: config is present.

Examples

Build the documentation (with API refresh):

from great_docs import GreatDocs

docs = GreatDocs()
docs.build()

Build with watch mode:

docs.build(watch=True)

Quick rebuild without API refresh:

docs.build(refresh=False)