API
class Docs
Initialize the Docs object.
Docs(
root: str,
/,
*,
pages: list[str | dict[str, typing.Any]],
site: dict[str, typing.Any] | None = None,
prefix: str = '',
variants: 'dict[str, Docs] | None' = None,
skip_home: bool = False
)
| Argument | Description |
|---|---|
root |
The root folder of the documentation project. |
pages |
The user-defined pages structure. |
site |
The site metadata. |
prefix |
The URL prefix for the documentation. |
variants |
A dictionary of documentation variants. |
skip_home |
Whether to skip generating the home page. |
function build
build(
*,
devmode: bool = True,
llm: bool = False
) -> None
function cli
cli()
function cli_build
Build the documentation for deployment.
cli_build(
*,
archive: bool,
llm: bool = False
) -> None
function cli_run
Run the documentation server and watch for changes.
cli_run() -> None
function init_catalog
init_catalog()
function insert_asset
Read the asset and return the content
insert_asset(
asset: str
) -> str
function log
log(
*args: Any
) -> None
function translate
Translate a key using the strings dictionary. If the key does not exist, return the key itself.
translate(
key: str,
**kwargs
) -> str