Configuration
On this page
Snow uses YAML configuration. The default file is config.yaml in the site root; use --config to select another file.
Site Information
| Setting | Type | Default | Description |
|---|---|---|---|
base_url |
string | http://127.0.0.1:8000 |
Site root URL |
title |
string | snow |
Site title |
description |
string | snow is a static site generator. |
Site description |
author |
string | honmaple |
Author |
language |
string | en |
Default language |
Directories
| Setting | Default | Description |
|---|---|---|
output_dir |
output |
Build output directory |
The project directory names content/, static/, templates/, and themes/ are fixed. Select a theme with theme, which refers to themes/{theme}/.
Static File Output Paths
By default, static/css/style.css is copied to {output_dir}/css/style.css. Use statics to relocate selected files or directories:
statics: css: static/css js: static/js site.webmanifest: static/site.webmanifest
Keys are case-insensitive source paths relative to static/. Values are destinations relative to output_dir. Use paths without leading or trailing slashes and without . or .. segments. Directory mappings preserve paths below the matched directory; the most specific rule wins.
Unmatched files keep their locations. For example, static/robots.txt still becomes {output_dir}/robots.txt.
Rules apply to project, theme, and mounted static files, not content attachments or assets hook output. ignored_static still matches source paths. References in templates, content, and CSS are not rewritten automatically; update them to the new URLs.
Content Processing
| Setting | Type | Default | Description |
|---|---|---|---|
content_truncate_len |
int | 49 |
Automatic summary length |
content_truncate_ellipsis |
string | ... |
Summary suffix |
ignored_content |
[]string | None | Content exclusion patterns |
ignored_static |
[]string | None | Static file exclusion patterns |
Ignore patterns match relative paths. Content files starting with _ or . are ignored by default, except section index files such as _index.md.
Modes
base_url: "http://127.0.0.1:8000" modes: publish: base_url: "https://example.com" develop: debug: true include: "develop.yaml"
--mode publish applies that mode's overrides. Use include to load configuration from another file.
Markup Rendering
markups: _default: style: "monokai" show_toc: true show_line_numbers: true prevent_pre_code: true markdown: enabled: true unsafe: false directive_blocks: false orgmode: enabled: true niklasfasching: enabled: false html: enabled: true
| Setting | Type | Default | Description |
|---|---|---|---|
enabled |
bool | Markdown/Org-mode: true; HTML/niklasfasching: false | Enable the parser |
style |
string | monokai |
Chroma highlighting style |
show_toc |
bool | true |
Generate a table of contents |
toc_id |
string | Empty | title or index; empty uses title-based anchors |
show_line_numbers |
bool | true |
Show line numbers |
prevent_pre_code |
bool | true |
Avoid extra pre/code wrappers when highlighting |
unsafe |
bool | false |
Markdown only: allow raw HTML |
directive_blocks |
bool | false |
Markdown only: enable export, center, quote, and shortcode directives |
Common styles include monokai, github, dracula, and solarized-dark.
markups._default supplies shared rendering options. Each parser's settings override those defaults. See Parsers for format-specific behavior.
Output Formats
formats: rss: template: "partials/rss.xml" atom: template: "partials/atom.xml"
Content types can override formats.{name}.path and formats.{name}.template.
Section Configuration
sections: _default: path: "{path:slug}/" sort_by: "weight,date desc,title" paginate: 0 posts: sort_by: "date desc" paginate: 5 template: "custom.html" pages: path: ""
Lookup order: sections.{directory}, parent directories, then sections._default.
| Setting | Default | Description |
|---|---|---|
path |
{path:slug}/ |
Output path; empty disables rendering |
path_style |
None | See Path Style |
sort_by |
weight,date desc,title |
Ascending weight, descending date, ascending title |
paginate |
0 |
Items per page; zero disables pagination |
paginate_path |
Automatic | Pagination path |
template |
None | Falls back to section.html |
An unset or empty pagination path uses page/{number}/ for directory paths and {name}{number}{extension} for file paths. See Pagination.
Page Configuration
pages: _default: path: "{path:slug}/{slug}/" posts: path: "articles/{date:%Y}/{date:%m}/{slug}.html" pages: hidden: true template: "page.html" drafts: draft: true
Lookup order: pages.{directory}, parent directories, then pages._default.
| Setting | Default | Description |
|---|---|---|
path |
{path:slug}/{slug}/ |
Output path |
path_style |
None | See Path Style |
template |
None | Falls back to page.html |
draft |
false |
Mark as a draft |
hidden |
false |
Hide from regular page lists |
lang |
Site language | Content language |
Path Style
path_style transforms the final path after variable expansion. It is available on Pages, Sections, Taxonomies, and taxonomy terms. Combine styles with commas to apply them in order, for example lower,slug.
| Value | Behavior |
|---|---|
none or empty |
Leave the path unchanged |
lower |
Lowercase the path |
slug |
Slugify path segments while preserving the final file extension |
slug_unicode |
Slugify while preserving Unicode, regardless of slugify.preserve_unicode |
Slugify
slugify: lowercase: true preserve_unicode: false preserve_chars: ""
These options affect {slug}, {path:slug}, {title:slug}, {term:slug}, and path_style: slug. By default, Unicode is transliterated to ASCII; Chinese text is converted to pinyin. Set preserve_unicode: true to keep Unicode letters and numbers.
| Setting | Default | Description |
|---|---|---|
lowercase |
true |
Convert to lowercase |
preserve_chars |
Empty | Additional characters to preserve, such as + or . |
preserve_unicode |
false |
Keep Unicode letters and numbers instead of transliterating |
Taxonomy Configuration
taxonomies: _default: path: "{taxonomy}/" sort_by: "name" term: path: "{taxonomy}/{term:slug}/" sort_by: "weight,date desc,title" tags: categories: authors:
Listing a name enables that taxonomy. Settings fall back from taxonomies.{name}.{key} to taxonomies._default.{key}.
Hook Configuration
| Hook | Enabled by Default | Default Weight |
|---|---|---|
mount |
false | 5 |
snakecase |
false | 10 |
assets |
true | 20 |
pelican |
false | 30 |
rewrite |
false | 30 |
filter |
false | 40 |
encrypt |
true | 50 |
links |
true | 55 |
shortcode |
true | 60 |
minify |
false | 70 |
alias |
false | 80 |
Lower weights run first; equal weights are ordered by hook name. Enabling an unregistered hook is an error. See Hooks for individual configuration.
Languages
language: "zh" languages: en: translations: "i18n/en.yaml" fr: translations: - id: "tags" tr: "Tags"
Each language can override global configuration.
Theme
theme: "snow"
theme selects the directory themes/{name}/.