Build Constants¶
Module: thornforge.buildsite.constant
Overview¶
This module centralizes ThornForge-owned asset paths, known metadata candidates, and helper functions for constructing shared stylesheet and script URLs.
Autodoc¶
Shared constants and asset path helpers used across the build pipeline.
This module centralizes ThornForge-owned asset locations, known metadata file candidates, and small URL/path construction helpers used across the build pipeline.
Build the URL to the shared top-navigation runtime script.
- Parameters:
root_prefix – Relative prefix from the current page back to the site root.
- Returns:
Asset-relative URL pointing at
top-nav.js.
- thornforge.buildsite.constant.build_stylesheet_hrefs(root_prefix: str) list[str]¶
Build stylesheet URLs for a page at a given directory depth.
- Parameters:
root_prefix – Relative prefix from the current page back to the site root, such as
""or"../".- Returns:
Ordered list of stylesheet URLs pointing at the shared CSS assets.
- thornforge.buildsite.constant.build_version_switcher_script_src(root_prefix: str) str¶
Build the URL to the shared version-switcher runtime script.
- Parameters:
root_prefix – Relative prefix from the current page back to the site root.
- Returns:
Asset-relative URL pointing at
version-switcher.js.
- thornforge.buildsite.constant.load_html_template(template_name: str) str¶
Load a bundled HTML template by file name.
- Parameters:
template_name – File name under
assets/templates/html.- Returns:
Template text read from disk using UTF-8 decoding.