smalldocs.cli
The
smalldocs command: render, preview, check, api and publish.cmd_render
cmd_render(args: Namespace) -> intBuild the site once.
| Parameter | Type | Default | Description |
|---|---|---|---|
args |
Namespace | required | The parsed command line |
| returns | int | The exit code |
cmd_preview
cmd_preview(args: Namespace) -> intBuild, serve, and rebuild on every change.
| Parameter | Type | Default | Description |
|---|---|---|---|
args |
Namespace | required | The parsed command line |
| returns | int | The exit code |
cmd_check
cmd_check(args: Namespace) -> intBuild into a scratch folder and list what smalldocs ignores, what it cannot read, and the broken links.
| Parameter | Type | Default | Description |
|---|---|---|---|
args |
Namespace | required | The parsed command line |
| returns | int | The exit code: 1 when there is anything to fix |
cmd_api
cmd_api(args: Namespace) -> intMake or check the API reference.
| Parameter | Type | Default | Description |
|---|---|---|---|
args |
Namespace | required | The parsed command line |
| returns | int | The exit code |
cmd_publish
cmd_publish(args: Namespace) -> intBuild the site and push it to a branch for GitHub Pages.
| Parameter | Type | Default | Description |
|---|---|---|---|
args |
Namespace | required | The parsed command line |
| returns | int | The exit code |
parser
parser() -> ArgumentParserDescribe the commands and their options.
| Parameter | Type | Default | Description |
|---|---|---|---|
| returns | ArgumentParser | The parser for every command |
main
main(argv: list[str] | None = None) -> intRun the smalldocs command.
| Parameter | Type | Default | Description |
|---|---|---|---|
argv |
list[str] | None | None |
The arguments, without the program’s name; None for sys.argv |
| returns | int | The exit code |