Functions
page_command
📄 Create a new page.
The page name will be automatically slugified for the filename.
Example: "My …
page_command
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…
layout_command
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…
partial_command
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…
theme_command
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.
_create_theme_structure
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.
_create_theme_templates
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.
_create_theme_assets
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 |
— |