Module

health.validators.tracks

Track validator for health checks.

Classes

TrackValidator
Validates track definitions and track item references. Checks: - Track data structure validity - T…
2

Validates track definitions and track item references.

Checks:

  • Track data structure validity
  • Track items reference existing pages
  • Track pages have valid track_id
Inherits from BaseValidator

Methods 1

validate
Validate track definitions and references.
2 list[CheckResult]
def validate(self, site: Site, build_context: BuildContext | Any | None = None) -> list[CheckResult]

Validate track definitions and references.

Parameters 2
site Site
build_context BuildContext | Any | None
Returns

list[CheckResult]

Internal Methods 1
_get_page
Get page using same logic as get_page template function. This mirrors the logi…
2 object | None
def _get_page(self, site: Site, path: str) -> object | None

Get page using same logic as get_page template function.

This mirrors the logic in bengal.rendering.template_functions.get_page to ensure validation matches runtime behavior.

Parameters 2
site Site
path str
Returns

object | None