httk.core.docs.manifests¶
JSON manifests used by the documentation site’s root and selector.
Functions¶
|
Build a root manifest with releases newest-first and optional dev last. |
|
Write one JSON version manifest using stable, human-readable formatting. |
|
Read a JSON version manifest from path. |
|
List every HTML page below html_dir as sorted POSIX paths. |
|
Write one per-version page manifest. |
Module Contents¶
- httk.core.docs.manifests.build_version_manifest(slug, url, source_commit, release_versions, has_dev)[source]¶
Build a root manifest with releases newest-first and optional dev last.
The default release points to the maintained
latest/duplicate of the newest release tree.- Parameters:
slug (str) – Documentation-site project slug.
url (str) – Public documentation-site URL.
source_commit (str | None) – Source commit represented by the site, when known.
release_versions (list[httk.core.docs.semver.Version] | tuple[httk.core.docs.semver.Version, Ellipsis]) – Published release versions.
has_dev (bool) – Whether the replaceable development site is published.
- Returns:
Root version manifest.
- Return type:
- httk.core.docs.manifests.write_version_manifest(path, manifest)[source]¶
Write one JSON version manifest using stable, human-readable formatting.
- Parameters:
path (str | pathlib.Path) – Destination manifest path.
- httk.core.docs.manifests.read_version_manifest(path)[source]¶
Read a JSON version manifest from path.
- Parameters:
path (str | pathlib.Path) – Manifest file to read.
- Returns:
Parsed version manifest.
- Raises:
ValueError – If the JSON value is not an object.
- Return type:
- httk.core.docs.manifests.build_page_manifest(version_name, html_dir)[source]¶
List every HTML page below html_dir as sorted POSIX paths.
- Parameters:
version_name (str) – Version name recorded in the manifest.
html_dir (str | pathlib.Path) – Root directory containing generated HTML.
- Returns:
Per-version page manifest.
- Return type: