Functions
_get_site_root
Get site root from CLI context, with CWD fallback for interactive use.
For CLI commands, using Pat…
_get_site_root
def _get_site_root(ctx: click.Context) -> Path
Get site root from CLI context, with CWD fallback for interactive use.
For CLI commands, using Path.cwd() as fallback is intentional and acceptable because the user is explicitly running commands from a directory they chose. This differs from library code where paths must be explicit.
See: plan/implemented/rfc-path-resolution-architecture.md
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
ctx |
click.Context |
— | Click context (may have site_root in obj) |
Returns
Absolute path to site rootPath
—
sources_group
Manage content sources (Content Layer).
Content sources can be local directories or remote sources…
sources_group
def sources_group() -> None
Manage content sources (Content Layer).
Content sources can be local directories or remote sources like GitHub repositories, Notion databases, or REST APIs.
Use 'bengal sources list' to see configured sources.
list_sources
List all configured content sources.
list_sources
def list_sources(ctx: click.Context) -> None
List all configured content sources.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
ctx |
click.Context |
— |
cache_status
Show cache status for content sources.
cache_status
def cache_status(ctx: click.Context) -> None
Show cache status for content sources.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
ctx |
click.Context |
— |
fetch_sources
Fetch content from remote sources.
fetch_sources
def fetch_sources(ctx: click.Context, source: str | None, force: bool) -> None
Fetch content from remote sources.
Parameters 3
| Name | Type | Default | Description |
|---|---|---|---|
ctx |
click.Context |
— | |
source |
str | None |
— | |
force |
bool |
— |
clear_cache
Clear cached content from remote sources.
clear_cache
def clear_cache(ctx: click.Context, source: str | None, yes: bool) -> None
Clear cached content from remote sources.
Parameters 3
| Name | Type | Default | Description |
|---|---|---|---|
ctx |
click.Context |
— | |
source |
str | None |
— | |
yes |
bool |
— |
register_commands
Register source commands with CLI.
register_commands
def register_commands(cli: click.Group) -> None
Register source commands with CLI.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
cli |
click.Group |
— |