Configuration
Zorto is configured via config.toml in your project root.
Four conceptual layers, one file. Everything from identity to appearance in config.toml.
Minimal example #
base_url = "https://example.com" title = "My site"
Full example #
base_url = "https://example.com" title = "My site" description = "A site built with Zorto" theme = "dkdc" compile_sass = true generate_feed = true generate_sitemap = true generate_llms_txt = true generate_md_files = true generate_search = true compile_all_themes = false default_language = "en" [[content_dirs]] path = "../docs" url_prefix = "docs" sort_by = "title" rewrite_links = true [cache] enable = true [markdown] highlight_code = true insert_anchor_links = "right" external_links_target_blank = true external_links_no_follow = true external_links_no_referrer = true smart_punctuation = true [[taxonomies]] name = "tags" [[taxonomies]] name = "categories" [extra] author = "Your Name" # Any custom data: accessible as config.extra in templates
Key sections #
Top-level settings #
| Field | Type | Default | Description |
|---|---|---|---|
base_url | string | required | Full URL of your site |
title | string | "" | Site title |
description | string | "" | Site description |
theme | string | "" | Theme name (one of 16 built-in themes: zorto, dkdc, default, ember, forest, ocean, rose, slate, midnight, sunset, mint, plum, sand, arctic, lime, charcoal) |
compile_sass | bool | true | Compile SCSS to CSS |
generate_feed | bool | false | Generate Atom feed |
generate_sitemap | bool | true | Generate sitemap.xml |
generate_llms_txt | bool | true | Generate llms.txt and llms-full.txt |
generate_md_files | bool | false | Generate .md versions of every page alongside HTML |
generate_search | bool | false | Generate SQLite FTS5 search index |
compile_all_themes | bool | false | Compile CSS for every built-in theme |
default_language | string | "en" | Default language code |
[markdown] #
Controls how Markdown is rendered to HTML. The most commonly used options:
highlight_code— syntax highlighting for fenced code blocksinsert_anchor_links— add#links to headings ("right"or"none")external_links_target_blank— open external links in a new tabsmart_punctuation— convert"quotes"to “quotes” and--to —
See the config reference for all fields.
[[taxonomies]] #
Define taxonomies like tags and categories. Each entry creates listing pages automatically:
[[taxonomies]] name = "tags"
This generates /tags/ (all tags) and /tags/<term>/ (pages with that tag). Add as many taxonomies as you need — tags, categories, authors, etc.
[[content_dirs]] #
Pull external directories into your site as content. Each entry maps an external path to a URL prefix:
[[content_dirs]] path = "../docs" url_prefix = "docs" sort_by = "title" rewrite_links = true
See content directories reference and how to build a docs site for details.
[cache] #
Cache executable code block results to speed up rebuilds:
[cache] enable = true
When enabled, Zorto caches code block output and reuses it if the code has not changed. See build optimization for details.
[extra] #
A free-form table for any custom data your templates need. Zorto passes it through as config.extra without interpreting it:
[extra] author = "Your Name" github = "https://github.com/you" menu_items = [ { name = "Docs", url = "/docs/" }, { name = "Blog", url = "/posts/" }, ]
Access in templates: {{ config.extra.author }}, {% for item in config.extra.menu_items %}.
Further reading #
- Configuration reference — complete field list with types and defaults
- Themes — how the
themesetting works - Content model — how frontmatter relates to config
- How to customize your theme — override styles and templates
- How to deploy — build commands for each hosting provider