Scaffold Your First Site

Create a Bengal site from a template in 5 minutes

4 min read 812 words

Bengal provides built-in templates to quickly create sites with common information architectures. This tutorial covers three ways to scaffold a site.

Quick Start: Template-Based Creation

The fastest way to start is with a template:

1
2
3
4
5
6
# Create a documentation site
bengal new site my-docs --template docs

# Navigate and preview
cd my-docs
bengal serve

Openhttp://localhost:5173to see your scaffolded site.

Available Templates

Template Best For Command
docs Technical documentation, knowledge bases bengal new site --template docs
blog Personal blogs, news sites bengal new site --template blog
portfolio Developer portfolios, project showcases bengal new site --template portfolio
resume CV/Resume with structured data bengal new site --template resume
landing Marketing landing pages bengal new site --template landing
changelog Version history, release notes bengal new site --template changelog

What Gets Created

When you runbengal new site my-docs --template docs, Bengal creates:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
my-docs/
├── config/
│   ├── _default/
│   │   ├── site.yaml        # Site identity (title, author, baseurl)
│   │   ├── content.yaml     # Content processing settings
│   │   ├── build.yaml       # Build configuration
│   │   ├── features.yaml    # Feature toggles
│   │   ├── theme.yaml       # Theme configuration
│   │   └── params.yaml      # Custom variables
│   └── environments/
│       ├── local.yaml       # Development overrides
│       └── production.yaml  # Production settings
├── content/
│   ├── index.md             # Home page
│   ├── getting-started/     # Onboarding section
│   │   ├── _index.md
│   │   ├── installation.md
│   │   └── quickstart.md
│   ├── guides/              # How-to guides
│   │   └── _index.md
│   └── api/                 # API reference
│       └── _index.md
└── .gitignore

Method 1: Interactive Wizard

For a guided experience, run without arguments:

bengal new site

The wizard prompts for:

  1. Site name (creates directory)
  2. Base URL (for production deployment)
  3. Template (select from list)

Method 2: Direct Template Selection

Skip prompts with explicit options:

1
2
3
4
5
# Blog with custom name
bengal new site my-blog --template blog

# Portfolio at specific URL
bengal new site portfolio --template portfolio

Method 3: Add Sections to Existing Site

Already have a site? Add sections without recreating:

1
2
3
4
5
# Add docs and tutorials sections
bengal project init --sections docs --sections tutorials

# Add sections with sample content
bengal project init --sections blog --with-content --pages-per-section 5

Section Type Inference

Bengal infers section types from names:

Name Pattern Inferred Type Behavior
blog, posts, articles, news blog Date-sorted, post-style
docs, documentation, guides, tutorials doc Weight-sorted, doc-style
projects, portfolio section Standard section
about, contact section Standard section

Customizing After Scaffolding

  1. 1

    Update Site Identity

    Replace placeholder values with your project's actual metadata.

    Editconfig/_default/site.yaml:

    1
    2
    3
    4
    5
    site:
      title: "My Documentation"
      description: "Documentation for my project"
      author: "Your Name"
      baseurl: "https://docs.example.com"
    
  2. 2

    Configure Features

    Enable RSS feeds, search, sitemaps, and other built-in features.

    Editconfig/_default/features.yaml:

    1
    2
    3
    4
    5
    6
    features:
      rss: true       # Generate RSS feed
      sitemap: true   # Generate sitemap.xml
      search: true    # Enable search
      json: true      # Generate JSON API
      llm_txt: true   # Generate llms.txt
    
  3. 3

    Add Your Content

    Replace placeholder content incontent/:

    1
    2
    3
    4
    5
    # Edit home page
    $EDITOR content/index.md
    
    # Add new page
    touch content/getting-started/configuration.md
    

Preview and Build

1
2
3
4
5
6
7
8
# Live preview with hot reload
bengal serve

# Production build
bengal build

# Build with specific environment
bengal build --environment production

Coming Soon: Skeleton Manifests

Bengal will soon support skeleton manifests - shareable YAML files that define complete site structures with frontmatter, cascades, and content stubs.

1
2
3
4
5
6
7
8
# Apply a community skeleton
bengal project skeleton apply @bengal/api-docs-starter

# Export your site's structure for others
bengal project skeleton export --output my-pattern.yaml

# Browse available skeletons
bengal project skeleton list --category documentation

Skeletons will enable:

  • Community patterns - Browse and use proven site structures
  • Org standards - Enforce consistent IA across projects
  • Theme compatibility - Find skeletons optimized for your theme

See RFC: Skeleton Manifests for the full proposal.

Next Steps

Troubleshooting