Configuration

Complete page.toml reference — site settings, collections, build options, deployment, languages, and images.

Overview

All configuration lives in page.toml at the project root. Here's a complete example:

[site]
title = "My Site"
description = "A personal blog and documentation"
base_url = "https://example.com"
language = "en"
author = "Jane Doe"

[[collections]]
name = "posts"
paginate = 10

[[collections]]
name = "docs"

[[collections]]
name = "pages"

[build]
output_dir = "dist"
minify = true
fingerprint = true

[deploy]
target = "github-pages"

[languages.es]
title = "Mi Sitio"
description = "Un blog personal"

[images]
widths = [480, 800, 1200]
quality = 80
webp = true
lazy_loading = true

[site]

FieldTypeDefaultDescription
titlestringrequiredSite title, used in templates and meta tags
descriptionstring""Site description for SEO
base_urlstring"http://localhost:3000"Full base URL for canonical links, sitemap, RSS
languagestring"en"Default language code
authorstring""Author name for JSON-LD and RSS

[[collections]]

Each [[collections]] entry defines a content collection. See Collections for full details.

[[collections]]
name = "posts"
label = "Blog"
directory = "posts"
url_prefix = "/posts"
default_template = "post.html"
has_date = true
has_rss = true
listed = true
nested = false
paginate = 10

[build]

FieldTypeDefaultDescription
output_dirstring"dist"Build output directory
minifyboolfalseStrip CSS/JS comments and collapse whitespace
fingerprintboolfalseAdd content hash to asset filenames for cache busting

When fingerprint = true, static files get hashed names (e.g., style.a1b2c3d4.css) and an asset-manifest.json is written to the output directory.

[deploy]

FieldTypeDefaultDescription
targetstring"github-pages"Deploy target: github-pages, cloudflare, netlify
repostringauto-detectedGit repository URL (GitHub Pages)
projectstringauto-detectedProject name (Cloudflare Pages)

[languages.*]

Optional. Add language sections to enable multi-language support:

[languages.es]
title = "Mi Sitio"
description = "Un blog personal y documentación"

[languages.fr]
title = "Mon Site"

Each language can override title and description. See Multi-language for details.

[images]

Optional. Configure automatic image processing:

FieldTypeDefaultDescription
widthsarray[]Target widths in pixels for resized copies
qualityint80JPEG/WebP quality (1-100)
webpboolfalseGenerate WebP variants
lazy_loadingboolfalseAdd loading="lazy" to <img> tags

When configured, images in static/ are resized to each width, optionally converted to WebP, and <img> tags in HTML are rewritten with srcset and <picture> elements.

Frontmatter

Content files use YAML frontmatter between --- delimiters:

---
title: "Page Title"
date: 2026-02-18
updated: 2026-02-19
description: "Used in meta tags, OG, Twitter Cards, JSON-LD"
image: /static/preview.jpg
slug: custom-slug
tags:
  - rust
  - web
draft: true
template: custom.html
robots: noindex
extra:
  hero: true
  color: "#4361EE"
---
FieldTypeRequiredDescription
titlestringYesPage title
datedatePosts onlyPublication date (YYYY-MM-DD)
updateddateNoLast modified date
descriptionstringNoSEO description
imagestringNoSocial preview image
slugstringNoOverride auto-generated slug
tagslistNoContent tags
draftboolNoExclude from build unless --drafts
templatestringNoOverride default template
robotsstringNoPer-page robots directive
extramapNoArbitrary data for templates