Module continuous_delivery_scripts.utils.documentation_templates

Load bundled documentation templates with HTML-only escaping.

Functions

def documentation_templates() ‑> jinja2.environment.Environment
Expand source code
def documentation_templates() -> jinja2.Environment:
    """Return the shared Jinja2 environment for HTML and discovery text files."""
    return jinja2.Environment(
        loader=jinja2.FileSystemLoader(str(Path(__file__).resolve().parents[1] / "templates")),
        autoescape=lambda name: bool(name and name.endswith(".html.jinja2")),
        keep_trailing_newline=True,
    )

Return the shared Jinja2 environment for HTML and discovery text files.