API
class
Docs
Initialize the Docs object.
Docs(
root: str,
/,
*,
pages: collections.abc.Sequence[str | writeadoc.types.TUserSection],
site: dict[str, typing.Any] | None = None,
prefix: str = '',
variants: dict[str, typing.Self] | 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(
self
)
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(
self
) -> None
function
init_catalog
init_catalog(
self
)
function
insert_asset
Read the asset and return the content
insert_asset(
asset: str
) -> str
function
log
log(
*args: Any
) -> None
function
markdown_filter
markdown_filter(
source: str,
code: str = ''
) -> str
function
translate
Translate a key using the strings dictionary. If the key does not exist, return the key itself.
translate(
key: str,
**kwargs
) -> str