Module

core.page.operations

Page Operations Mixin - Operations and transformations on pages.

Classes

PageOperationsMixin
4

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.
1 str
def render(self, template_engine: Any) -> str

Render the page using the provided template engine.

Parameters 1
template_engine Any

Template engine instance

Returns

str

Rendered HTML content

validate_links
Validate all links in the page.
0 list[str]
def validate_links(self) -> list[str]

Validate all links in the page.

Returns

list[str]

List of broken link URLs

apply_template
Apply a specific template to this page.
2 str
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

str

Rendered content with template applied

extract_links
Extract all links from the page content. Skips content inside fenced code bloc…
0 list[str]
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[str]

List of link URLs found in the page