Functions
health_cli
Health check and validation commands.
health_cli
def health_cli() -> None
Health check and validation commands.
linkcheck
Check internal and external links in the site.
Validates that all links in your site work correctl…
linkcheck
def linkcheck(external_only: bool, internal_only: bool, max_concurrency: int | None, per_host_limit: int | None, timeout: float | None, retries: int | None, retry_backoff: float | None, exclude: tuple[str, ...], exclude_domain: tuple[str, ...], ignore_status: tuple[str, ...], output_format: str, output_file: str | None, traceback: str | None) -> None
Check internal and external links in the site.
Validates that all links in your site work correctly:
- Internal links point to existing pages and anchors
- External links return successful HTTP status codes
The site must be built before checking internal links. Use --format json with --output to generate a report file for CI/CD integration.
Parameters 13
| Name | Type | Default | Description |
|---|---|---|---|
external_only |
bool |
— | |
internal_only |
bool |
— | |
max_concurrency |
int | None |
— | |
per_host_limit |
int | None |
— | |
timeout |
float | None |
— | |
retries |
int | None |
— | |
retry_backoff |
float | None |
— | |
exclude |
tuple[str, ...] |
— | |
exclude_domain |
tuple[str, ...] |
— | |
ignore_status |
tuple[str, ...] |
— | |
output_format |
str |
— | |
output_file |
str | None |
— | |
traceback |
str | None |
— |
_ensure_site_built
Ensure the site is built before checking links.
Checks if output directory exists and contains rec…
_ensure_site_built
def _ensure_site_built(site: Site, cli: CLIOutput) -> None
Ensure the site is built before checking links.
Checks if output directory exists and contains recent files. If not, automatically builds the site.
Parameters 2
| Name | Type | Default | Description |
|---|---|---|---|
site |
Site |
— | Site instance |
cli |
CLIOutput |
— | CLI output helper |
_build_config
Build linkcheck config from CLI flags and site config.
_build_config
def _build_config(site_config: dict[str, Any], max_concurrency: int | None, per_host_limit: int | None, timeout: float | None, retries: int | None, retry_backoff: float | None, exclude: tuple[str, ...], exclude_domain: tuple[str, ...], ignore_status: tuple[str, ...]) -> dict[str, Any]
Build linkcheck config from CLI flags and site config.
Parameters 9
| Name | Type | Default | Description |
|---|---|---|---|
site_config |
dict[str, Any] |
— | |
max_concurrency |
int | None |
— | |
per_host_limit |
int | None |
— | |
timeout |
float | None |
— | |
retries |
int | None |
— | |
retry_backoff |
float | None |
— | |
exclude |
tuple[str, ...] |
— | |
exclude_domain |
tuple[str, ...] |
— | |
ignore_status |
tuple[str, ...] |
— |
Returns
dict[str, Any]