Config

Config()

Configuration settings for styling the metadata.

See the design for an explanation of how Config is designed. See the guide on how to set up custom styles and sections. See One, Many, and Content help for more details on how to set up the sections.

Attributes

style : Style

The built-in style to use for outputting the documentation. Ignored when template_dir is set.

template_dir : Optional[Path]

When using a custom style, this should be the relative directory path to the Jinja2 template files. The directory must contain at least one template Jinja2 file and a sections.toml file that contains attributes for the One and Many classes.

output_dir : Path

The directory where output files will be saved.

Examples

import seedcase_flower as fl
from pathlib import Path

# A config using the built-in `quarto-resource-listing` style and outputting
# to the `my-docs/` folder.
config = fl.Config(
    style=fl.Style.quarto_resource_listing, output_dir=Path("my-docs/")
)

# A custom style that points to a template folder and outputs
# to the default `docs/` folder.
config = fl.Config(template_dir=Path("templates/"))

# A custom style that points to a template folder and outputs
# to the `my-docs/` folder.
config = fl.Config(template_dir=Path("templates/"), output_dir=Path("my-docs/"))