Module

cli.commands.init

Commands for initializing site structure.

This module provides the 'bengal init' command for quickly scaffolding site structure. It now delegates to the skeleton system under the hood.

Features:

  • Create sections using built-in skeletons (blog, docs, empty)
  • Backward compatibility with --with-content flags (maps to props)

Functions

create_skeleton_from_args
Create an in-memory skeleton based on legacy init arguments. This bridges the gap between the old …
3 Skeleton
def create_skeleton_from_args(sections: tuple[str, ...], with_content: bool, pages_per_section: int) -> Skeleton

Create an in-memory skeleton based on legacy init arguments.

This bridges the gap between the old imperative init command and the new declarative skeleton system.

Parameters 3

Name Type Default Description
sections tuple[str, ...]
with_content bool
pages_per_section int

Returns

Skeleton

init
🏗️ Initialize site structure. Uses the Component Model to generate sections and pages.
5 None
def init(sections: tuple[str, ...], with_content: bool, pages_per_section: int, dry_run: bool, force: bool) -> None

🏗️ Initialize site structure.

Uses the Component Model to generate sections and pages.

Parameters 5

Name Type Default Description
sections tuple[str, ...]
with_content bool
pages_per_section int
dry_run bool
force bool