feat: add render options
This commit is contained in:
@@ -19,17 +19,26 @@ def main(
|
|||||||
Edition.ea,
|
Edition.ea,
|
||||||
Edition.nea,
|
Edition.nea,
|
||||||
],
|
],
|
||||||
source: Annotated[str | None, typer.Option(help="Content source directory.")] = None,
|
input: Annotated[str | None, typer.Option("--input", "-i", help="Content source directory.")] = None,
|
||||||
destination: Annotated[str | None, typer.Option(help="Destination directory to build to.")] = None,
|
output: Annotated[str | None, typer.Option("--output", "-o", help="Destination directory to build to.")] = None,
|
||||||
|
render_editions: Annotated[bool, typer.Option(help="Skip building editions.")] = True,
|
||||||
|
render_solutions: Annotated[bool, typer.Option(help="Skip building solutions.")] = True,
|
||||||
) -> None:
|
) -> None:
|
||||||
conf = config.Config(content_path=source, build_path=destination)
|
conf = config.Config(content_path=input, build_path=output)
|
||||||
bd = build.Build(conf)
|
bd = build.Build(conf)
|
||||||
|
|
||||||
# Build surrounding website
|
# Build surrounding website
|
||||||
bd.build_website()
|
bd.build_website()
|
||||||
# Build individual editions
|
|
||||||
for e in edition:
|
if render_editions:
|
||||||
bd.build_edition(e)
|
# Build individual editions
|
||||||
|
for e in edition:
|
||||||
|
bd.build_edition(e)
|
||||||
|
|
||||||
|
if render_solutions:
|
||||||
|
# Build solution pages
|
||||||
|
bd.build_solutions()
|
||||||
|
|
||||||
# Copy assets to build folder
|
# Copy assets to build folder
|
||||||
bd.build_assets()
|
bd.build_assets()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user