smalldocs.cli

The smalldocs command: render, preview, check, api and publish.

cmd_render

source

cmd_render(args: Namespace) -> int

Build the site once.

Parameter Type Default Description
args Namespace required The parsed command line
returns int The exit code

cmd_preview

source

cmd_preview(args: Namespace) -> int

Build, serve, and rebuild on every change.

Parameter Type Default Description
args Namespace required The parsed command line
returns int The exit code

cmd_check

source

cmd_check(args: Namespace) -> int

Build 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

source

cmd_api(args: Namespace) -> int

Make or check the API reference.

Parameter Type Default Description
args Namespace required The parsed command line
returns int The exit code

cmd_publish

source

cmd_publish(args: Namespace) -> int

Build 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

source

parser() -> ArgumentParser

Describe the commands and their options.

Parameter Type Default Description
returns ArgumentParser The parser for every command

main

source

main(argv: list[str] | None = None) -> int

Run 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