Zero to Deployed
Build and deploy your first Bengal site in under an hour.
Your first Bengal journey—from zero experience to a live website. Install Bengal, create a blog, and deploy to GitHub Pages with automatic builds.
Tip
Duration: ~45 min | Prerequisite: Python 3.14+, GitHub account
Install Bengal
Install Bengal using pip, uv, or from source
Install Bengal
Requirements
Bengal requires Python 3.14 or later. For best performance, use the free-threaded build (Python 3.14t), which enables true parallel processing.
Install
uv pip install bengal
Or for a one-time run without installation:
uvx bengal --version
pip install bengal
pipx install bengal
This installs Bengal in an isolated environment while making the bengalcommand available globally.
git clone https://github.com/lbliii/bengal.git
cd bengal
make setup
make install
This installs Bengal in editable mode with development dependencies.
Verify Installation
bengal --version
You should see output like: Bengal SSG, version 0.1.10
Upgrade Bengal
Bengal includes a built-in upgrade command that automatically detects how it was installed:
# Interactive upgrade (recommended)
bengal upgrade
# Skip confirmation
bengal upgrade -y
# Preview changes without executing
bengal upgrade --dry-run
The upgrade command:
- Detects your installer (uv, pip, pipx, conda)
- Checks PyPI for the latest version (cached for 24 hours)
- Shows a confirmation before making changes
Tip
Bengal will show a notification after commands when a new version is available. You can disable this by settingBENGAL_NO_UPDATE_CHECK=1in your environment.
Python Version Setup
pyenv lets you install and switch between multiple Python versions:
# macOS (with Homebrew)
brew install pyenv
# Install Python 3.14
pyenv install 3.14.0
# Set as default
pyenv global 3.14.0
# Verify
python --version
Download Python 3.14 from python.org/downloads.
After installation, verify:python3 --version
Free-Threaded Python
For best build performance, use the free-threaded Python build (Python 3.14t). This enables true parallel processing for 1.5-2x faster builds on multi-core machines.
# With pyenv
pyenv install 3.14.0t
pyenv global 3.14.0t
# Verify free-threading is enabled
python -c "import sys; print('Free-threaded!' if sys._is_gil_enabled() == False else 'GIL enabled')"
Bengal automatically detects the free-threaded build and enables parallel processing.
Troubleshooting
Command not found
Ensure Python's bin directory is in your PATH.
If using a virtual environment, activate it:
source .venv/bin/activate
Try reinstalling:
pip uninstall bengal && pip install bengal
Python version errors
Verify your Python version:
python --version
# or
python3 --version
Bengal requires Python 3.14 or later. Install using pyenv or the official installer.
Permission errors
Use the--userflag:
pip install --user bengal
Or use a virtual environment:
python -m venv venv && source venv/bin/activate
pip install bengal
Next Steps
- Writer Quickstart — Start creating content
- Themer Quickstart — Customize your site's look
- Tutorials — Guided learning journeys
Writer Quickstart
Create your first site and start writing content
Writer Quickstart
Create your first Bengal site and publish content in 5 minutes. No theming or code required.
Prerequisites
Before You Start
- Basic Markdown knowledge
- Bengal installed
- Terminal access
Create Your Site
bengal new site myblog --template blog
cd myblog
The --template blog flag scaffolds a complete blog structure with sample posts. Other templates: default, docs, portfolio, product, resume.
Or use a custom skeleton YAML
Define your site structure in one YAML file:
name: My Blog
structure:
- path: index.md
type: blog
props:
title: My Blog
content: |
# Welcome to My Blog
- path: posts/hello-world.md
type: blog
props:
title: Hello World
date: "2026-01-15"
content: |
# Hello World
My first post!
Apply it:
bengal project skeleton apply my-blog.yaml
See Skeleton YAML Quickstart for more examples.
Start the Dev Server
bengal serve
Your browser opens automatically at http://localhost:5173/. The server rebuilds on save—CSS changes apply instantly without page refresh.
Create Your First Post
bengal new page my-first-post --section blog
This creates content/blog/my-first-post.md. Edit it:
---
title: My First Post
date: 2026-01-15
tags: [welcome]
description: Getting started with Bengal
---
# My First Post
Welcome to my blog! Bengal makes publishing simple.
## What's Next
- Add more posts with `bengal new page`
- Customize your theme
- Deploy to the web
Save. The page appears instantly in your browser.
Customize Your Site
Editconfig/_default/site.yaml:
site:
title: "My Awesome Blog"
description: "Thoughts on code, design, and life"
language: "en"
Other config files
Bengal splits configuration across focused files inconfig/_default/:
| File | Purpose |
|---|---|
build.yaml |
Parallel builds, output directory |
theme.yaml |
Theme selection and options |
features.yaml |
Search, RSS, sitemap toggles |
content.yaml |
Markdown processing options |
See Configuration Reference for details.
Build and Deploy
bengal build
Output goes to public/. Deploy to any static host:
| Platform | Build Command | Output |
|---|---|---|
| Netlify | bengal build |
public |
| Vercel | bengal build |
public |
| GitHub Pages | bengal build |
public |
Bengal auto-detects Netlify, Vercel, and GitHub Pages to setbaseurlautomatically. See Deployment Guide for CI/CD workflows.
Frontmatter Essentials
Every page starts with YAML frontmatter:
---
title: Page Title # Required
date: 2026-01-15 # Publication date (ISO format)
description: SEO text # Search/social preview
tags: [tag1, tag2] # Taxonomy
draft: true # Exclude from production
---
All frontmatter fields
| Field | Description |
|---|---|
title |
Page title (required) |
date |
Publication date (ISO format) |
description |
SEO/social preview text |
tags |
Taxonomy tags (e.g.,[python, web]) |
weight |
Sort order in section (lower = first) |
draft |
trueexcludes from production builds |
slug |
Custom URL (overrides filename) |
type |
Page type for template selection |
variant |
Visual presentation variant |
lang |
Language code (en, es, etc.) |
nav_title |
Short title for navigation |
aliases |
Redirect URLs to this page |
Custom fields are accessible in templates viapage.props.fieldname, page.params.fieldname, or page.metadata.fieldname(all equivalent).
Next Steps
- Content Authoring — Markdown features and syntax
- Content Organization — Structure your site
- Theming — Customize appearance
- Build a Blog — Complete tutorial
Section 3: Page Not Found
Could not find page:docs/tutorials/scaffold-your-site
Section 4: Page Not Found
Could not find page:docs/tutorials/build-a-blog
Deployment
Deploy your Bengal site to production
Deploy Your Site
Bengal generates static HTML, CSS, and JavaScript files. This means you can host your site anywhere that serves static files (e.g., GitHub Pages, Netlify, Vercel, AWS S3, Nginx).
The Production Build
When you are ready to ship, run the build command:
bengal build --environment production
This command:
- Loads configuration from
config/environments/production.yaml(if it exists) - Minifies HTML output (enabled by default)
- Generates the
public/directory with your complete site
Common Build Flags
| Flag | Description | Use Case |
|---|---|---|
--environment production |
Loads production config overrides. | Always use for shipping. |
--strict |
Fails the build on template errors. | Highly Recommended for CI/CD. |
--clean-output |
Cleans thepublic/directory before building. |
Recommended to avoid stale files. |
--fast |
Maximum performance (quiet output, full parallelism). | Fast CI builds. |
--verbose |
Shows detailed build output (phase timing, stats). | Useful for debugging CI failures. |
Example full command for CI:
bengal build --environment production --strict --clean-output
GitHub Pages
Deploy using GitHub Actions. Create.github/workflows/deploy.yml:
name: Deploy to GitHub Pages
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.14'
- name: Install Bengal
run: pip install bengal
- name: Build Site
run: bengal build --environment production --strict --clean-output
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './public'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Netlify
Create anetlify.tomlin your repository root:
[build]
publish = "public"
command = "bengal build --environment production"
[build.environment]
PYTHON_VERSION = "3.14"
Vercel
Configure your project:
- Build Command:
bengal build --environment production - Output Directory:
public - Ensure your
requirements.txtincludesbengal.
Automatic Platform Detection
Bengal auto-detects your deployment platform and configuresbaseurlautomatically:
| Platform | Detection | Baseurl Source |
|---|---|---|
| GitHub Pages | GITHUB_ACTIONS=true |
Inferred fromGITHUB_REPOSITORY |
| Netlify | NETLIFY=true |
URL or DEPLOY_PRIME_URL |
| Vercel | VERCEL=true |
VERCEL_URL |
You can override auto-detection with theBENGAL_BASEURLenvironment variable:
BENGAL_BASEURL="https://custom-domain.com" bengal build --environment production
Pre-Deployment Checklist
Before you merge to main or deploy:
- Run
bengal config doctor: Checks for common configuration issues. - Run
bengal build --strictlocally: Ensures no template errors. - Run
bengal validate: Runs health checks on your site content. - Check
config/environments/production.yaml: Ensure yourbaseurlis set to your production domain.
# config/environments/production.yaml
site:
baseurl: "https://example.com"
Seealso
- Configuration — Environment-specific settings
- Performance — Optimize build times
Section 6: Page Not Found
Could not find page:docs/tutorials/automate-with-github-actions