Classes
RenderingValidator
Validates HTML rendering quality.
Checks:
- Basic HTML structure (<html>, <head>, <body>)
- No unr…
RenderingValidator
Validates HTML rendering quality.
Checks:
- Basic HTML structure (<html>, <head>, <body>)
- No unrendered Jinja2 variables in output
- Template functions registered and working
- Basic SEO metadata present
Inherits from
BaseValidatorMethods 1
validate
Run rendering validation checks.
validate
def validate(self, site: Site, build_context: BuildContext | Any | None = None) -> list[CheckResult]
Run rendering validation checks.
Parameters 2
site |
Site |
|
build_context |
BuildContext | Any | None |
Returns
list[CheckResult]
Internal Methods 5
_check_html_structure
Check basic HTML structure in output pages.
_check_html_structure
def _check_html_structure(self, site: Site) -> list[CheckResult]
Check basic HTML structure in output pages.
Parameters 1
site |
Site |
Returns
list[CheckResult]
_check_unrendered_jinja2
Check for unrendered Jinja2 syntax in output.
_check_unrendered_jinja2
def _check_unrendered_jinja2(self, site: Site) -> list[CheckResult]
Check for unrendered Jinja2 syntax in output.
Parameters 1
site |
Site |
Returns
list[CheckResult]
_detect_unrendered_jinja2
Detect if HTML has unrendered Jinja2 syntax (not in code blocks).
Distinguishe…
_detect_unrendered_jinja2
def _detect_unrendered_jinja2(self, html_content: str) -> bool
Detect if HTML has unrendered Jinja2 syntax (not in code blocks).
Distinguishes between:
- Actual unrendered templates (bad)
- Documented/escaped syntax in code blocks (ok)
Parameters 1
html_content |
str |
HTML content to check |
Returns
True if unrendered Jinja2 found (not in code blocks)bool
—
_check_template_functions
Check that template functions are registered.
_check_template_functions
def _check_template_functions(self, site: Site) -> list[CheckResult]
Check that template functions are registered.
Parameters 1
site |
Site |
Returns
list[CheckResult]
_check_seo_metadata
Check for basic SEO metadata in pages.
_check_seo_metadata
def _check_seo_metadata(self, site: Site) -> list[CheckResult]
Check for basic SEO metadata in pages.
Parameters 1
site |
Site |
Returns
list[CheckResult]