Source code in src/git_changelog/templates/__init__.py
18192021222324
defconfigure_env(env:Environment)->None:"""Configure the Jinja environment. Parameters: env: The environment to configure. """env.filters.update({"is_url":_filter_is_url})
Source code in src/git_changelog/templates/__init__.py
27282930313233343536
defget_custom_template(path:str|Path)->Template:"""Get a custom template instance. Arguments: path: Path to the custom template. Returns: The Jinja template. """returnJINJA_ENV.from_string(Path(path).read_text())
Source code in src/git_changelog/templates/__init__.py
39404142434445464748
defget_template(name:str)->Template:"""Get a builtin template instance. Arguments: name: The template name. Returns: The Jinja template. """returnJINJA_ENV.from_string(TEMPLATES_PATH.joinpath(f"{name}.md.jinja").read_text())