Module

cli.commands.new.config

Configuration directory generation for new Bengal sites.

Creates the config/ directory structure with environment-aware configuration files.

Functions

create_config_directory
Create config directory structure with sensible defaults.
6 None
def create_config_directory(site_path: Path, site_title: str, theme: str, cli: CLIOutput, template: str = 'default', baseurl: str = 'https://example.com') -> None

Create config directory structure with sensible defaults.

Parameters 6

Name Type Default Description
site_path Path

Root path for the new site

site_title str

Title for the site

theme str

Theme name to use

cli CLIOutput

CLI output helper for logging

template str 'default'

Site template type (blog, docs, portfolio, resume, default)

baseurl str 'https://example.com'

Base URL for the site

_write_yaml
Write data as YAML to file.
2 None
def _write_yaml(path: Path, data: dict[str, Any]) -> None

Write data as YAML to file.

Parameters 2

Name Type Default Description
path Path
data dict[str, Any]
_create_site_config
Create site configuration.
2 dict[str, Any]
def _create_site_config(site_title: str, baseurl: str) -> dict[str, Any]

Create site configuration.

Parameters 2

Name Type Default Description
site_title str
baseurl str

Returns

dict[str, Any]

_create_theme_config
Create theme configuration.
1 dict[str, Any]
def _create_theme_config(theme: str) -> dict[str, Any]

Create theme configuration.

Parameters 1

Name Type Default Description
theme str

Returns

dict[str, Any]

_create_content_config
Create content configuration based on template type.
1 dict[str, Any]
def _create_content_config(template: str) -> dict[str, Any]

Create content configuration based on template type.

Parameters 1

Name Type Default Description
template str

Returns

dict[str, Any]

_create_build_config
Create build configuration.
0 dict[str, Any]
def _create_build_config() -> dict[str, Any]

Create build configuration.

Returns

dict[str, Any]

_create_features_config
Create features configuration.
0 dict[str, Any]
def _create_features_config() -> dict[str, Any]

Create features configuration.

Returns

dict[str, Any]

_create_local_env_config
Create local development environment config.
0 dict[str, Any]
def _create_local_env_config() -> dict[str, Any]

Create local development environment config.

Returns

dict[str, Any]

_create_production_env_config
Create production environment config.
0 dict[str, Any]
def _create_production_env_config() -> dict[str, Any]

Create production environment config.

Returns

dict[str, Any]