Module

cli.commands.new.scaffolds

Scaffold generation commands for pages, layouts, partials, and themes.

Provides CLI commands for creating new content and template scaffolds.

Functions

page_command
📄 Create a new page. The page name will be automatically slugified for the filename. Example: "My …
2 None
def page_command(name: str, section: str) -> None

📄 Create a new page.

The page name will be automatically slugified for the filename. Example: "My Awesome Page" → my-awesome-page.md

Parameters 2

Name Type Default Description
name str
section str
layout_command
📋 Create a new layout template. Layouts are reusable HTML templates used by pages. Example: "artic…
1 None
def layout_command(name: str) -> None

📋 Create a new layout template.

Layouts are reusable HTML templates used by pages. Example: "article" → templates/layouts/article.html

See also:

bengal new partial - Create a partial template
bengal new theme - Create a theme scaffold

Parameters 1

Name Type Default Description
name str
partial_command
🧩 Create a new partial template. Partials are reusable template fragments included in other templa…
1 None
def partial_command(name: str) -> None

🧩 Create a new partial template.

Partials are reusable template fragments included in other templates. Example: "sidebar" → templates/partials/sidebar.html

See also:

bengal new layout - Create a layout template
bengal new theme - Create a theme scaffold

Parameters 1

Name Type Default Description
name str
theme_command
🎨 Create a new theme scaffold. Themes are self-contained template and asset packages. Example: "my…
1 None
def theme_command(name: str) -> None

🎨 Create a new theme scaffold.

Themes are self-contained template and asset packages. Example: "my-theme" → themes/my-theme/ with templates, partials, and assets

See also:

bengal new layout - Create a layout template
bengal new partial - Create a partial template

Parameters 1

Name Type Default Description
name str
_create_theme_structure
Create theme directory structure.
1 None
def _create_theme_structure(theme_path: Path) -> None

Create theme directory structure.

Parameters 1

Name Type Default Description
theme_path Path
_create_theme_templates
Create theme template files.
2 None
def _create_theme_templates(theme_path: Path, name: str) -> None

Create theme template files.

Parameters 2

Name Type Default Description
theme_path Path
name str
_create_theme_assets
Create theme asset files.
2 None
def _create_theme_assets(theme_path: Path, name: str) -> None

Create theme asset files.

Parameters 2

Name Type Default Description
theme_path Path
name str