Classes
PageOperationsMixin
PageOperationsMixin
Attributes
| Name | Type | Description |
|---|---|---|
content |
str |
|
rendered_html |
str |
|
links |
list[str] |
|
source_path |
Path |
Methods 4
render
Render the page using the provided template engine.
render
def render(self, template_engine: Any) -> str
Render the page using the provided template engine.
Parameters 1
template_engine |
Any |
Template engine instance |
Returns
Rendered HTML contentstr
—
validate_links
Validate all links in the page.
validate_links
def validate_links(self) -> list[str]
Validate all links in the page.
Returns
List of broken link URLslist[str]
—
apply_template
Apply a specific template to this page.
apply_template
def apply_template(self, template_name: str, context: dict[str, Any] | None = None) -> str
Apply a specific template to this page.
Parameters 2
template_name |
str |
Name of the template to apply |
context |
dict[str, Any] | None |
Additional context variables |
Returns
Rendered content with template appliedstr
—
extract_links
Extract all links from the page content.
Skips content inside fenced code bloc…
extract_links
def extract_links(self) -> list[str]
Extract all links from the page content.
Skips content inside fenced code blocks to avoid false positives from code examples in documentation.
Returns
List of link URLs found in the pagelist[str]
—