betty.generate module

Provide the Generation API.

class betty.generate.GenerateSiteEvent[source]

Bases: ProjectEvent

Dispatched to generate (part of) a project’s site.

async betty.generate.create_file(path: Path) AsyncContextManager[AsyncTextIOWrapper][source]

Create the file for a resource.

async betty.generate.create_html_resource(path: Path) AsyncContextManager[AsyncTextIOWrapper][source]

Create the file for an HTML resource.

async betty.generate.create_json_resource(path: Path) AsyncContextManager[AsyncTextIOWrapper][source]

Create the file for a JSON resource.

async betty.generate.generate(project: Project) None[source]

Generate a new site.