Functions
get_line_with_context
Get a line from a file with context (lines before/after).
Returns formatted string with line numbe…
get_line_with_context
def get_line_with_context(file_path: Path, line_number: int, context_lines: int = 2) -> str
Get a line from a file with context (lines before/after).
Returns formatted string with line numbers and content.
Parameters 3
| Name | Type | Default | Description |
|---|---|---|---|
file_path |
Path |
— | |
line_number |
int |
— | |
context_lines |
int |
2 |
Returns
str
_get_relative_content_path
Get a user-friendly relative path for display.
Tries to show path relative to 'content' directory …
_get_relative_content_path
def _get_relative_content_path(file_path: Path) -> str
Get a user-friendly relative path for display.
Tries to show path relative to 'content' directory for wayfinding. Falls back to showing last 3 path components if content dir not found.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
file_path |
Path |
— |
Returns
str
check_directive_syntax
Check directive syntax is valid.
check_directive_syntax
def check_directive_syntax(data: dict[str, Any]) -> list[CheckResult]
Check directive syntax is valid.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
data |
dict[str, Any] |
— |
Returns
list[CheckResult]
check_directive_completeness
Check directives are complete (have required content, options, etc).
check_directive_completeness
def check_directive_completeness(data: dict[str, Any]) -> list[CheckResult]
Check directives are complete (have required content, options, etc).
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
data |
dict[str, Any] |
— |
Returns
list[CheckResult]
check_directive_performance
Check for performance issues with directive usage.
check_directive_performance
def check_directive_performance(data: dict[str, Any]) -> list[CheckResult]
Check for performance issues with directive usage.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
data |
dict[str, Any] |
— |
Returns
list[CheckResult]
check_directive_rendering
Check that directives rendered properly in output HTML.
check_directive_rendering
def check_directive_rendering(site: Site, data: dict[str, Any]) -> list[CheckResult]
Check that directives rendered properly in output HTML.
Parameters 2
| Name | Type | Default | Description |
|---|---|---|---|
site |
Site |
— | |
data |
dict[str, Any] |
— |
Returns
list[CheckResult]
_issue_type_label
Convert issue type to human-readable label.
_issue_type_label
def _issue_type_label(issue_type: str) -> str
Convert issue type to human-readable label.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
issue_type |
str |
— |
Returns
str
_has_unrendered_directives
Check if HTML has unrendered directive blocks (outside code blocks).
_has_unrendered_directives
def _has_unrendered_directives(html_content: str) -> bool
Check if HTML has unrendered directive blocks (outside code blocks).
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
html_content |
str |
— | HTML content to check |
Returns
True if unrendered directives found (not in code blocks)bool
—