Classes
StaticOrchestrator
Orchestrates static file copying to output directory.
Copies files from static/ directory to outpu…
StaticOrchestrator
Orchestrates static file copying to output directory.
Copies files from static/ directory to output directory verbatim without any processing. Preserves directory structure and warns about large static folders that might impact build performance.
Creation:
Direct instantiation: StaticOrchestrator(site)
- Created by BuildOrchestrator during build
- Requires Site instance with root_path and output_dir
Attributes
| Name | Type | Description |
|---|---|---|
site |
— | Site instance with root_path and output_dir |
logger |
— | Logger instance for static file operations |
static_dir |
— | Path to static/ directory (from config or default) |
output_dir |
— | Output directory path |
enabled |
— | Whether static file copying is enabled |
Relationships |
— |
|
Methods 5
is_enabled
Check if static folder exists and is enabled.
is_enabled
def is_enabled(self) -> bool
Check if static folder exists and is enabled.
Returns
bool
get_total_size
Calculate total size of static folder in bytes.
get_total_size
def get_total_size(self) -> int
Calculate total size of static folder in bytes.
Returns
int
copy
Copy static files to output directory.
Files are copied verbatim without any p…
copy
def copy(self) -> int
Copy static files to output directory.
Files are copied verbatim without any processing. Directory structure is preserved.
Returns
Number of files copiedint
—
copy_single
Copy a single static file (for incremental updates).
copy_single
def copy_single(self, rel_path: Path | str) -> bool
Copy a single static file (for incremental updates).
Parameters 1
rel_path |
Path | str |
Path relative to static folder |
Returns
True if file was copied successfullybool
—
remove_single
Remove a single static file from output (when source is deleted).
remove_single
def remove_single(self, rel_path: Path | str) -> bool
Remove a single static file from output (when source is deleted).
Parameters 1
rel_path |
Path | str |
Path relative to static folder |
Returns
True if file was removed successfullybool
—
Internal Methods 1
__init__
__init__
def __init__(self, site: Site) -> None
Parameters 1
site |
Site |