Autodoc CSS Skeleton Test

1. CLI Command (Full Example)
Deprecated Async

bengal build

Build the static site from source content. This command processes all markdown files, applies templates, and generates the final HTML output.

12 Options 2 Arguments
View source

Usage

bengal build [OPTIONS] [SOURCE]

Options

Name Type Default Description
--source Path ./content Source directory containing content files.
--output Path ./public Output directory for generated site.
--parallel bool True Enable parallel processing for faster builds.

Examples

Basic usage

bengal build

With custom output directory

bengal build --output ./dist
2. Python Class
Dataclass

bengal.core.Site

Central site container that holds all pages, sections, and configuration.

class Site:
    pages: list[Page]
    sections: dict[str, Section]
    config: SiteConfig

Parameters

root Path
Root directory of the site content. Default: Path(".")
config SiteConfig | None
Site configuration. If not provided, will be loaded from bengal.toml.

Attributes

Name Type Description
pages list[Page] All pages in the site.
sections dict[str, Section] Section lookup by path.

Methods

render (page: Page) → str async

Render a page to HTML string.

page Page
The page to render.
validate () → ValidationResult

Validate site configuration and content.

3. Python Function

bengal.build

Build the site from source content to output directory.

def build(
    source: Path,
    output: Path,
    parallel: bool = True,
    incremental: bool = False
) -> Site

Returns

Site The built site instance with all rendered pages.

Raises

ConfigurationError
When configuration file is invalid or missing.
BuildError
When build process fails due to template or content errors.
4. CLI Command Group (Cards)

bengal

Bengal Static Site Generator - A powerful and flexible SSG.

Subcommands

5. OpenAPI Endpoint

GET /api/v1/users

List all users with optional filtering and pagination.

Query Parameters

Name Type Default Description
page integer 1 Page number for pagination.
limit integer 20 Maximum number of users to return.

Related Endpoints

6. All Badge Types
Deprecated Async Abstract Dataclass Required Default

Badge Showcase

7. API Cards with Status Dots (Preferred Design)
ParsedDocstring 2
Container for parsed docstring data.
dataclass

Container for parsed docstring data.

Methods 1

to_dict 0 dict[str, Any]

Convert to dictionary representation.

Internal Methods 1
__init__ 0 None

Initialize the parsed docstring.

GoogleDocstringParser 7
Parse Google-style docstrings.

Parse Google-style docstrings.

NumpyDocstringParser 7
Parse NumPy-style docstrings.

Parse NumPy-style docstrings.

SphinxDocstringParser 1
Parse Sphinx-style docstrings.

Parse Sphinx-style docstrings.

Functions

parse_docstring 2 ParsedDocstring
Parse docstring and extract structured information.

Parse docstring and extract structured information.

detect_docstring_style 1 str
Auto-detect docstring style.

Auto-detect docstring style.