Complete reference for every sarde.yaml setting, resolved through the five-layer config cascade
Sarde reads its configuration from a sarde.yaml file at the project root. Every key documented on this page can appear in that file. Keys not present fall back to their defaults.
Config cascade
Configuration is resolved through five layers. Each layer overrides the one before it.
Priority
Layer
Source
1 (lowest)
Embedded defaults
Compiled into the Sarde binary
2
Theme config
theme.yaml inside the active theme directory
3
Project config
sarde.yaml at the project root
4
CLI flags
--drafts, --baseURL, --future
5 (highest)
Environment variables
SARDE_* prefixed variables
Boolean fields use a three-state model internally: unset (nil), explicitly true, or explicitly false. An unset boolean in a higher layer does not override a value set by a lower layer. Setting a boolean to false in sarde.yaml explicitly disables it, even if a lower layer enabled it.
Slices (lists) are replaced wholesale, not merged. A non-empty list in a higher layer replaces the entire list from a lower layer. Maps (redirects, permalinks) are merged per-key: higher layers add or overwrite individual entries without removing others.
site
Key
Type
Default
Description
title
string
"My Site"
Site title. Appears in the browser tab and header. Required.
description
string
""
Site description. Used in meta tags and feeds. Recommended.
url
string
""
Production URL (e.g., https://example.com). Used for canonical links, sitemaps, and feeds. Recommended.
language
string
"en"
Default language code (BCP 47). Required.
logo
string or object
-
Site logo. Accepts a single path string (used for both themes) or an object with light, dark, and alt fields.
favicon
string
""
Path to the favicon file relative to public/.
edit_url
string
""
Base URL for "Edit this page" links. Append the content file path to this URL. Example: https://github.com/user/repo/edit/main/content.
title_delimiter
string
"|"
Separator between page title and site title in the browser tab.
heading_links
bool
true
Add anchor links to headings.
custom_404
string
""
Path to a custom 404 page template.
site.logo (object form)
Key
Type
Default
Description
light
string
""
Logo path for light mode.
dark
string
""
Logo path for dark mode.
alt
string
""
Alt text for the logo image.
social
A list of social links displayed in the header and footer.
Token overrides for light mode. Map of token name to CSS value. See Theme Tokens.
dark_overrides
map
{}
Token overrides for dark mode only. Same format as overrides.
primary_color
string
""
Primary brand color (hex). Shorthand for setting the --sd-accent token.
accent_color
string
""
Accent color (hex). Sets --sd-accent and auto-derives hover/high/low variants.
font_family
string
""
Base font family CSS value.
font_mono
string
""
Monospace font family CSS value.
code_light
string
""
Syntax highlighting theme for light mode.
code_dark
string
""
Syntax highlighting theme for dark mode.
toc
Global table of contents display settings. These control which extracted headings appear in the TOC sidebar. Per-collection overrides are available under collections.<name>.toc. For controlling which headings are extracted (IDs, anchor links, link validation), see markdown.toc.
Key
Type
Default
Description
enabled
bool
true
Show the table of contents panel.
min_level
int
2
Minimum heading level to display. Range: 1-6. Must be ≤ max_level.
max_level
int
4
Maximum heading level to display. Range: 1-6.
header
Key
Type
Default
Description
search
bool
true
Show the search button in the header.
theme_toggle
bool
true
Show the light/dark mode toggle.
social
bool
true
Show social links in the header.
links
list
[]
Navigation links in the header.
Header/footer links
Each entry in header.links or footer.links:
Key
Type
Default
Description
label
string
-
Display text.
url
string
-
Link URL.
external
bool
false
Open in a new tab.
footer
Key
Type
Default
Description
text
string
""
Footer text (supports Markdown).
links
list
[]
Footer navigation links. Same format as header links.
credits
bool
true
Show "Powered by Sarde" credit line.
head
Inject custom tags, CSS, and JavaScript into every page's <head>.
Key
Type
Default
Description
tags
list
[]
Custom HTML tags to inject.
custom_css
list
[]
Paths to additional CSS files (relative to assets/).
custom_js
list
[]
Paths to additional JavaScript files (relative to assets/).
Head tags
Each entry in head.tags:
Key
Type
Default
Description
tag
string
-
HTML tag name (e.g., "meta", "link").
attrs
map
-
Tag attributes as key-value pairs.
content
string
-
Tag inner content (for tags like <script>).
YAML
head:
tags:
-tag:meta
attrs:
name:google-site-verification
content:abc123
custom_css:
-custom/styles.css
custom_js:
-custom/analytics.js
build
Key
Type
Default
Description
output
string
"dist"
Output directory for the built site. Required.
base_path
string
""
URL base path for sites hosted in a subdirectory (e.g., /docs).
clean
bool
true
Delete the output directory before each build.
sitemap
bool
true
Generate sitemap.xml.
minify
bool
false
Minify HTML output.
last_updated
string
"mtime"
Strategy for page "last updated" timestamps. git uses git commit dates. mtime uses file modification time. false, off, or none disables it.
feed
bool
true
Generate RSS and Atom feeds for blog collections.
drafts
bool
false
Include draft pages in the build output.
future
bool
false
Include pages with future publish_date values.
expired
bool
-
Include pages past their expiry_date.
parallel
bool
true
Enable parallel rendering.
cache
bool
-
Enable build caching.
markdown
Key
Type
Default
Description
katex
bool
true
Enable KaTeX math rendering. Assets are injected only when math syntax is detected on a page.
mermaid
bool
true
Enable Mermaid diagram rendering. Assets are injected only when sarde-mermaid code blocks are detected.
cdn
bool
false
Load KaTeX/Mermaid assets from a CDN instead of bundled files.
Controls which heading levels are extracted during the build: ID injection, anchor links, TOC entries, search index anchors, and link validation targets. Headings outside this range are left untouched. This is separate from the display-level toc setting, which filters which extracted headings appear in the sidebar widget.
Key
Type
Default
Description
min_heading_level
int
2
Minimum heading level to extract. Range: 1-6. Must be ≤ max_heading_level.
max_heading_level
int
4
Maximum heading level to extract. Range: 1-6.
markdown.codeblocks
Key
Type
Default
Description
engine
string
""
Syntax highlighting engine. nuri or chroma. When empty, defaults to nuri (tree-sitter-based).
style
string
"class"
Highlighting output style. Only class is supported.
light_theme
string
"github-light"
Light mode highlighting theme name.
dark_theme
string
"github-dark"
Dark mode highlighting theme name.
theme
string
""
Single theme override (applies to both modes).
dark_mode_selector
string
"[data-theme=\"dark\"]"
CSS selector for dark mode scoping.
prefetch
Key
Type
Default
Description
enabled
bool
true
Enable link prefetching for faster navigation.
strategy
string
"hover"
Prefetch trigger strategy. hover prefetches on mouse hover. visible prefetches links visible in the viewport. idle prefetches during idle time.
delay
int
300
Delay in milliseconds before prefetching starts (for hover strategy). Min: 0.
images
Key
Type
Default
Description
widths
list of int
[400, 800, 1200]
Responsive image widths to generate (in pixels). Each value must be at least 1.
Compression quality for generated images. Range: 1-100.
placeholder
string
"lqip"
Placeholder strategy while images load. lqip (low-quality image placeholder), blur, dominantColor, or none.
max_width
int
2400
Maximum image width in pixels. Images wider than this are downscaled. Min: 1.
lazy_loading
bool
true
Add loading="lazy" to images.
dimensions
bool
true
Add width and height attributes to prevent layout shift.
search
Key
Type
Default
Description
enabled
bool
true
Enable site search.
provider
string
"orama"
Search engine provider. Only orama is supported.
icons
Key
Type
Default
Description
default_prefix
string
"lucide"
Icon set used for names without a prefix. The bundled set is lucide.
sets
list
[]
Additional Iconify JSON icon sets to load.
sets_dir
string
""
Directory of additional Iconify *.json sets, auto-discovered by filename prefix.
local_dir
string
"icons"
Directory of local *.svg files, referenced by filename.
attribution
string
""
Attribution line for icon sets whose license requires it.
render
string
"inline"
Rendering mode. inline outputs a full <svg> element per use. sprite renders one hidden <symbol> per unique icon and references it via <use>.
Icon sets
Each entry in icons.sets:
Key
Type
Default
Description
prefix
string
-
Icon set prefix (e.g., "mdi").
file
string
-
Path to the Iconify JSON file.
YAML
icons:
sets:
-prefix:mdi
file:icons/mdi.json
analytics
Key
Type
Default
Description
provider
string
""
Analytics provider name.
site_id
string
""
Site/property ID for the analytics provider.
script
string
""
Custom analytics script URL or path.
plugins
Key
Type
Default
Description
enabled
list of string
See below
List of enabled built-in plugin names. Replaces the default list entirely when set. Does not affect external plugins.
disabled
list of string
[]
Plugin names to turn off, of any type (built-in, client-side, or external). Only removes the named entries; never replaces the rest.
config
map
{}
Per-plugin configuration. Keys are plugin names, values are maps of plugin-specific options.
Default enabled list:
YAML
plugins:
enabled:
-search
-seo
-sitemap
-robots
-rss
-atom
-content_lint
-link_validator
-redirects
-llms_txt
-katex
-mermaid
-social_cards
YAML
plugins:
config:
social_cards:
skip_if_image:true
rss:
limit:20
slideviewer:
always:false
YAML
plugins:
disabled:
-social_cards
-reading-progress
taxonomies
Each key under taxonomies defines a taxonomy. The value can be a bare string (sets the singular form) or an object with the fields below.
Key
Type
Default
Description
singular
string
-
Singular form of the taxonomy name (e.g., "tag" for a tags taxonomy).
paginate_by
int
-
Number of items per taxonomy term page. Min: 1.
undefined_tags
string
-
Behavior when content uses a tag not defined in data/. warn, error, ignore, or create.
render
bool
true
Generate taxonomy listing pages.
show_tags
bool
-
Show taxonomy terms on content pages.
YAML
taxonomies:
tags:tag
categories:
singular:category
paginate_by:20
collections
Each key under collections defines overrides for a content collection. Collections are auto-detected from directory names under content/ (e.g., blog, docs, slides). These settings overlay the auto-detected defaults. See Content and Collections for the full auto-detection table.