Classes
BuildWarning
dataclass
A build warning or error.
BuildWarning
dataclass A build warning or error.
Attributes
| Name | Type | Description |
|---|---|---|
file_path |
str |
|
message |
str |
|
warning_type |
str |
Methods 1
short_path
property
Get shortened path for display.
short_path
property def short_path(self) -> str
Get shortened path for display.
Returns
str
BuildStats
dataclass
Container for build statistics.
BuildStats
dataclass Container for build statistics.
Attributes
| Name | Type | Description |
|---|---|---|
total_pages |
int |
|
regular_pages |
int |
|
generated_pages |
int |
|
tag_pages |
int |
|
archive_pages |
int |
|
pagination_pages |
int |
|
total_assets |
int |
|
total_sections |
int |
|
taxonomies_count |
int |
|
build_time_ms |
float |
|
parallel |
bool |
|
incremental |
bool |
|
skipped |
bool |
|
total_directives |
int |
|
directives_by_type |
dict[str, int] |
|
discovery_time_ms |
float |
|
taxonomy_time_ms |
float |
|
rendering_time_ms |
float |
|
assets_time_ms |
float |
|
postprocess_time_ms |
float |
|
health_check_time_ms |
float |
|
memory_rss_mb |
float |
|
memory_heap_mb |
float |
|
memory_peak_mb |
float |
|
cache_hits |
int |
|
cache_misses |
int |
|
time_saved_ms |
float |
|
cache_bypass_hits |
int |
|
cache_bypass_misses |
int |
|
menu_time_ms |
float |
|
related_posts_time_ms |
float |
|
fonts_time_ms |
float |
|
output_dir |
str | None |
|
strict_mode |
bool |
|
changed_outputs |
list[str] | None |
|
health_report |
HealthReport | None |
|
warnings |
list[Any] |
|
template_errors |
list[Any] |
Methods 8
has_errors
property
Check if build has any errors.
has_errors
property def has_errors(self) -> bool
Check if build has any errors.
Returns
bool
syntax_errors
property
Get template errors that are syntax errors.
Filters template_errors to return …
syntax_errors
property def syntax_errors(self) -> list[Any]
Get template errors that are syntax errors.
Filters template_errors to return only those with error_type == "syntax". These are typically Jinja2 TemplateSyntaxError instances (missing endif, unclosed tags, etc.).
Returns
List of TemplateRenderError objects with syntax errors.list[Any]
—
not_found_errors
property
Get template errors that are "not found" errors.
Filters template_errors to re…
not_found_errors
property def not_found_errors(self) -> list[Any]
Get template errors that are "not found" errors.
Filters template_errors to return only those with error_type == "not_found". These occur when a page requests a template that doesn't exist in any template directory.
Returns
List of TemplateRenderError objects for missing templates.list[Any]
—
warnings_by_type
property
Group warnings by type.
warnings_by_type
property def warnings_by_type(self) -> dict[str, list[BuildWarning]]
Group warnings by type.
Returns
dict[str, list[BuildWarning]]
add_warning
Add a warning to the build.
add_warning
def add_warning(self, file_path: str, message: str, warning_type: str = 'other') -> None
Add a warning to the build.
Parameters 3
file_path |
str |
|
message |
str |
|
warning_type |
str |
add_template_error
Add a rich template error.
add_template_error
def add_template_error(self, error: Any) -> None
Add a rich template error.
Parameters 1
error |
Any |
add_directive
Track a directive usage.
add_directive
def add_directive(self, directive_type: str) -> None
Track a directive usage.
Parameters 1
directive_type |
str |
to_dict
Convert stats to dictionary.
to_dict
def to_dict(self) -> dict[str, Any]
Convert stats to dictionary.
Returns
dict[str, Any]
Functions
format_time
Format milliseconds for display.
format_time
def format_time(ms: float) -> str
Format milliseconds for display.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
ms |
float |
— |
Returns
str
display_warnings
Display grouped warnings and errors.
display_warnings
def display_warnings(stats: BuildStats) -> None
Display grouped warnings and errors.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
stats |
BuildStats |
— | Build statistics with warnings |
display_simple_build_stats
Display simple build statistics for writers.
Clean, minimal output focused on success/failure and …
display_simple_build_stats
def display_simple_build_stats(stats: BuildStats, output_dir: str | None = None) -> None
Display simple build statistics for writers.
Clean, minimal output focused on success/failure and critical issues only. Perfect for content authors who just want to know "did it work?"
Parameters 2
| Name | Type | Default | Description |
|---|---|---|---|
stats |
BuildStats |
— | Build statistics to display |
output_dir |
str | None |
None |
Output directory path to display |
display_build_stats
Display build statistics in a colorful table.
display_build_stats
def display_build_stats(stats: BuildStats, show_art: bool = True, output_dir: str | None = None) -> None
Display build statistics in a colorful table.
Parameters 3
| Name | Type | Default | Description |
|---|---|---|---|
stats |
BuildStats |
— | Build statistics to display |
show_art |
bool |
True |
Whether to show ASCII art |
output_dir |
str | None |
None |
Output directory path to display |
show_building_indicator
Show a building indicator (minimal - header is shown by build orchestrator).
show_building_indicator
def show_building_indicator(text: str = 'Building') -> None
Show a building indicator (minimal - header is shown by build orchestrator).
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
text |
str |
'Building' |
show_error
Show an error message with mouse emoji (errors that Bengal needs to catch!).
show_error
def show_error(message: str, show_art: bool = True) -> None
Show an error message with mouse emoji (errors that Bengal needs to catch!).
Parameters 2
| Name | Type | Default | Description |
|---|---|---|---|
message |
str |
— | |
show_art |
bool |
True |
show_welcome
Show welcome banner with Bengal cat mascot.
show_welcome
def show_welcome() -> None
Show welcome banner with Bengal cat mascot.
show_clean_success
Show clean success message using CLI output system.
Note: This is now only used for --force mode (…
show_clean_success
def show_clean_success(output_dir: str) -> None
Show clean success message using CLI output system.
Note: This is now only used for --force mode (when there's no prompt). Regular clean uses inline success message after prompt confirmation.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
output_dir |
str |
— |
display_template_errors
Display all collected template errors.
display_template_errors
def display_template_errors(stats: BuildStats) -> None
Display all collected template errors.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
stats |
BuildStats |
— | Build statistics with template errors |