Configuration
Taxus uses a site.toml configuration file to define site settings and build options.
Configuration File
Create a site.toml file in your project root:
[site]
name = "My Site"
base_url = "https://example.com"
description = "A description of my site"
author = "Your Name"
[build]
content_dir = "content"
output_dir = "dist"
static_dir = "static"
styles_dir = "styles"
templates_dir = "templates"
[feed]
rss_enabled = true
atom_enabled = false
limit = 20
full_content = false
Configuration Sections
[site] Section
Site metadata and information.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Site name/title |
base_url | string | Yes | Base URL for the site (used for absolute URLs) |
description | string | No | Site description for SEO |
author | string | No | Site author name |
[build] Section
Build configuration options. All fields have defaults.
| Field | Type | Default | Description |
|---|---|---|---|
content_dir | string | "content" | Directory containing Markdown content |
output_dir | string | "dist" | Output directory for generated files |
static_dir | string | "static" | Directory containing static assets |
styles_dir | string | "styles" | Directory containing SCSS stylesheets |
templates_dir | string | "templates" | Directory containing HTML templates |
[feed] Section
RSS/Atom feed configuration for content syndication.
| Field | Type | Default | Description |
|---|---|---|---|
rss_enabled | bool | true | Enable RSS 2.0 feed generation |
atom_enabled | bool | false | Enable Atom feed generation |
limit | number | 0 | Maximum entries in feed (0 = all) |
full_content | bool | false | Include full content vs summary |
title | string | None | Custom feed title (defaults to site name) |
rss_path | string | None | RSS feed output path (default: rss.xml) |
atom_path | string | None | Atom feed output path (default: atom.xml) |
[highlight] Section
Syntax highlighting configuration for code blocks.
| Field | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Enable tree-sitter syntax highlighting |
class_prefix | string | "hl-" | CSS class prefix for highlight spans |
See Syntax Highlighting for details on styling and supported languages.
[images] Section
Responsive image processing configuration for hero images.
| Field | Type | Default | Description |
|---|---|---|---|
widths | array | [400, 800, 1200] | Responsive breakpoint widths in pixels |
quality | number | 80 | Output quality (1–100) |
format | string | "webp" | Output format: "webp", "jpeg", or "png" |
output_dir | string | "images" | Subdirectory within dist/ for processed images |
See Images for details on hero images and template usage.
Minimal Configuration
The minimal required configuration:
[site]
name = "My Site"
base_url = "https://example.com"
All [build] and [feed] settings use their default values.
Full Configuration Example
[site]
name = "My Blog"
base_url = "https://example.com"
description = "A blog about Rust and web development"
author = "Jane Doe"
[build]
content_dir = "content"
output_dir = "dist"
static_dir = "static"
styles_dir = "styles"
templates_dir = "templates"
[feed]
rss_enabled = true
atom_enabled = true
limit = 20
full_content = false
title = "My Blog Feed"
rss_path = "rss.xml"
atom_path = "atom.xml"
[highlight]
enabled = true
class_prefix = "hl-"
[images]
widths = [400, 800, 1200]
quality = 80
format = "webp"
output_dir = "images"
Validation
Configuration is validated when loaded:
site.namemust not be emptysite.base_urlmust not be empty
Feed URLs
After generation, feeds are available at:
- RSS:
https://example.com/rss.xml(or customrss_path) - Atom:
https://example.com/atom.xml(or customatom_path)