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.

FieldTypeRequiredDescription
namestringYesSite name/title
base_urlstringYesBase URL for the site (used for absolute URLs)
descriptionstringNoSite description for SEO
authorstringNoSite author name

[build] Section

Build configuration options. All fields have defaults.

FieldTypeDefaultDescription
content_dirstring"content"Directory containing Markdown content
output_dirstring"dist"Output directory for generated files
static_dirstring"static"Directory containing static assets
styles_dirstring"styles"Directory containing SCSS stylesheets
templates_dirstring"templates"Directory containing HTML templates

[feed] Section

RSS/Atom feed configuration for content syndication.

FieldTypeDefaultDescription
rss_enabledbooltrueEnable RSS 2.0 feed generation
atom_enabledboolfalseEnable Atom feed generation
limitnumber0Maximum entries in feed (0 = all)
full_contentboolfalseInclude full content vs summary
titlestringNoneCustom feed title (defaults to site name)
rss_pathstringNoneRSS feed output path (default: rss.xml)
atom_pathstringNoneAtom feed output path (default: atom.xml)

[highlight] Section

Syntax highlighting configuration for code blocks.

FieldTypeDefaultDescription
enabledbooltrueEnable tree-sitter syntax highlighting
class_prefixstring"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.

FieldTypeDefaultDescription
widthsarray[400, 800, 1200]Responsive breakpoint widths in pixels
qualitynumber80Output quality (1–100)
formatstring"webp"Output format: "webp", "jpeg", or "png"
output_dirstring"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.name must not be empty
  • site.base_url must not be empty

Feed URLs

After generation, feeds are available at:

  • RSS: https://example.com/rss.xml (or custom rss_path)
  • Atom: https://example.com/atom.xml (or custom atom_path)