Configuration
Alloy reads its configuration from alloy.config.yaml (also .yml, .toml, or .json) in the project root. The first match wins.
Both title and baseURL are required. Other fields default to sensible values when omitted.
Top-level fields
| Field | Type | Default | Description |
|---|---|---|---|
title |
string | — (required) | Site title. Available in templates as site.title. |
baseURL |
string | — (required) | Full URL including protocol. Used by absolute_url filter and sitemap generation. |
language |
string | "en" |
Default site language code. Available as site.language. |
updateCheck |
boolean | false |
Check for newer Alloy versions when alloy dev or alloy serve starts. See below. |
updateCheck
When true, Alloy checks GitHub Releases for a newer version each time alloy dev or alloy serve starts. The check runs in the background without blocking server startup. alloy build never checks.
Alloy caches the result at ~/.config/alloy/update-check.json (respects XDG_CONFIG_HOME) for 24 hours. Within that window, Alloy reads the cache instead of making a network request. Running alloy version --check queries GitHub immediately and overwrites the cache, resetting the 24-hour TTL.
build
Controls output directory and cleanup behavior.
| Field | Type | Default | Description |
|---|---|---|---|
build.output |
string | "_site" |
Output directory for the built site. |
build.clean |
boolean | true |
Delete the output directory before each build. Set false to preserve files from previous builds. |
content
Controls which files are treated as content and how Markdown is rendered.
| Field | Type | Default | Description |
|---|---|---|---|
content.formats |
string[] | ["md", "html"] |
File extensions treated as content pages. Other files in content/ are copied as passthrough. |
content.markdown.toc |
boolean | true |
Generate page.toc heading structure for Markdown pages. Set false to disable. |
content.markdown.goldmark.unsafe |
boolean | true |
Allow raw HTML in Markdown. Set false to escape all HTML tags. |
content.markdown.goldmark.typographer |
boolean | false |
Convert straight quotes to smart quotes, -- to en-dash, --- to em-dash. |
content.markdown.goldmark.templateTags |
boolean | true |
Treat {{ }} and {% %} in Markdown prose as template syntax. Set false to render them as literal text. |
content.markdown.goldmark.autoHeadingID |
boolean | true |
Add id attributes to headings. Also activates {.class #id key=value} block-level attribute syntax. |
content.markdown.goldmark.customElements |
boolean | true |
Treat multi-line custom elements (tags with hyphens) as block-level HTML. Preserves content inside verbatim. |
templates
| Field | Type | Default | Description |
|---|---|---|---|
templates.engine |
string | "liquid" |
Template engine. "liquid" or "gotemplate" (alias "go"). One engine per project. |
structure
Override default directory names. All paths are relative to the project root.
| Field | Type | Default | Description |
|---|---|---|---|
structure.content |
string | "content" |
Content files directory. |
structure.layouts |
string | "layouts" |
Template layouts directory. |
structure.assets |
string | "assets" |
Processed assets directory. |
structure.static |
string | "static" |
Static files directory (copied verbatim to output root). |
structure.data |
string | "data" |
Global data files directory. |
structure.plugins |
string | "plugins" |
Plugin files directory. |
plugins
| Field | Type | Default | Description |
|---|---|---|---|
plugins.timeout |
integer | 5000 |
Hook timeout in milliseconds. Alloy discards a timed-out hook’s mutations. |
plugins.workers |
integer or "auto" |
"auto" |
Node subprocess worker count for per-page hooks. "auto" uses min(CPU_count / 2, 8) with a floor of 2. |
taxonomies
Declare which front matter keys create taxonomy collections. Each key can be a bare declaration or an object with options.
| Field | Type | Default | Description |
|---|---|---|---|
taxonomies.<name>.permalink |
string | "/<name>/:slug/" |
URL pattern for term pages. |
taxonomies.<name>.layout |
string | taxonomy name | Layout template for index and term pages. |
taxonomies.<name>.render |
boolean | true |
Generate output pages. Set false for data-only taxonomies. |
See Taxonomies for usage.
collections
Declare sections as collections without date-based permalink patterns.
| Field | Type | Default | Description |
|---|---|---|---|
collections.<name>.sortBy |
string | "date" |
Front matter field to sort by. |
collections.<name>.order |
string | "desc" |
Sort direction. "asc" or "desc". |
See Collections for usage.
pagination
| Field | Type | Default | Description |
|---|---|---|---|
pagination.path |
string | "page" |
URL segment for paginated pages (e.g., /articles/page/2/). |
See Pagination for usage.
data
Map external files into the site.data.* namespace.
| Field | Type | Default | Description |
|---|---|---|---|
data.files.<key> |
string | — | Path to an external data file (YAML, JSON, or TOML). Relative to project root. Available as site.data.<key>. |
See Data Files for formats and external sources.
sources
Fetch data from REST APIs, GraphQL endpoints, or plugin handlers at build time.
| Field | Type | Default | Description |
|---|---|---|---|
sources.<name>.type |
string | — | "rest", "graphql", or "plugin". |
sources.<name>.url |
string | — | Endpoint URL (rest). |
sources.<name>.endpoint |
string | — | GraphQL endpoint URL. |
sources.<name>.query |
string | — | GraphQL query string. |
sources.<name>.plugin |
string | — | Plugin source handler name (for type: "plugin"). |
sources.<name>.cache |
integer | — | Cache TTL in seconds. Cached to .alloy/fetch-cache/. |
sources.<name>.as |
string | source key | site.data.* key for the fetched data. Defaults to the source map key. |
See Data Files — External data sources for usage.
passthrough
Copy external directories or glob patterns into the output.
| Field | Type | Default | Description |
|---|---|---|---|
passthrough[].from |
string | — | Source path or glob pattern. Relative to project root. |
passthrough[].to |
string | — | Destination path in the output directory. "." targets the output root. |
passthrough[].exclude |
string[] | — | Glob patterns to skip. |
watch
Register external directories for file watching during alloy dev and alloy serve. Changes trigger the appropriate pipeline stage.
| Field | Type | Default | Description |
|---|---|---|---|
watch[].from |
string | — | Directory to watch. Cannot overlap structure.* directories. |
watch[].type |
string | — | Pipeline stage to trigger: "content", "layout", or "data". |
sitemap
Alloy generates sitemap.xml by default. Disable it or set global defaults.
Disable sitemap generation entirely:
| Field | Type | Default | Description |
|---|---|---|---|
sitemap |
boolean or object | true |
Set false to disable sitemap generation. |
sitemap.changefreq |
string | — | Default <changefreq> for all pages. |
sitemap.priority |
float | — | Default <priority> for all pages (0.0–1.0). |
Per-page overrides in front matter: sitemap: { priority: 1.0 } or sitemap: false to exclude a page.
languages
Opt-in multilingual support. Each key is a language code with its own content tree under content/<code>/.
| Field | Type | Default | Description |
|---|---|---|---|
languages.<code>.title |
string | — | Language-specific site title. Overrides top-level title. |
languages.<code>.weight |
integer | — | Sort order. Lowest weight is the default language. |
languages.<code>.root |
boolean | false |
Output at site root (_site/) instead of _site/<code>/. |
languages.<code>.strings |
map | — | Translation strings for shared layouts. Access via site.language.strings.<key>. |
See Internationalization for content structure and template usage.
ssr
Experimental server-side rendering. See SSR for details.
| Field | Type | Default | Description |
|---|---|---|---|
ssr.command |
string | — | SSR worker command. |
ssr.mode |
string | — | Rendering mode. |
ssr.timeout |
string | — | Per-page timeout (Go duration string, e.g., "10s"). |