Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nuejs/nue/llms.txt
Use this file to discover all available pages before exploring further.
site.yaml is the single configuration file for a Nue project. It sits at the project root and controls everything from server port to sitemap generation and per-page metadata. Configuration cascades from the site level down through app-level app.yaml files to individual pages, with more specific files overriding broader ones.
File location
site.yaml is absent, Nue looks for an index.md or index.html in the root to confirm it is a Nue project. If neither exists, the CLI exits with Not a Nue directory.
Site-only keys (SITE_CONF)
These keys are read once at startup and are not merged down to app or page level:
Global site settings. Currently supports one sub-key:
Design-system settings. Reserved for the design-system pipeline; the exact sub-keys are defined by your active design system.
Development-server settings.
Named content collections. Each key is a collection name; the value describes where to find its source files. Collections are used to assemble blog roll pages, product catalogs, and other list-based views.
Key–value pairs merged into At build time,
meta only during production builds (nue build). Use this to set production-specific meta tags such as analytics IDs or CDN URLs without exposing them during development.Object.assign(conf.meta, conf.production) is applied and the production key is deleted from the configuration.Default port for
nue serve and nue preview. Overridden at the CLI level with --port.Controls sitemap generation. Set to
true to emit a sitemap.xml with defaults, or provide an object for fine-grained control.Site-wide reference-link definitions used by Nuemark. Each key is a link label; the value is a URL string or
{ href, title } object. These links are available in every Markdown file.Cascading keys (ALL_CONF)
These keys exist in SITE_CONF (above) plus the additional keys below. All of them can appear in site.yaml, app.yaml, or page front-matter. App-level values override site-level values; page-level front-matter overrides app-level values.
Extra CSS or JS files to include on every page (or every page in an app). Paths are relative to the project root or to the app directory.
Files to exclude from the build for this app or page. Useful for removing a site-level
include on a specific page.HTML In app or page YAML, additional keys are merged in:
<meta> tag values and page-level data available in templates. Sub-keys are merged (not replaced) at each level — app meta is layered on top of site meta, and page meta on top of app meta.Structured content blocks injected into the page. Like
meta, content objects are merged at each level. Values are available in layout templates.Browser import-map configuration. Defines bare module specifiers resolved in the browser.
SVG sprite settings. Controls how inline SVG symbols are assembled and injected.
App-level overrides with app.yaml
Place an app.yaml file in any subdirectory to create an application scope. Configuration in app.yaml is merged on top of site.yaml using mergeConf:
Site-only keys (
site, design, server, collections, production, port, sitemap, links) defined in app.yaml are silently ignored by mergeValue. Only the cascading keys are merged.Page front-matter
Individual Markdown and HTML files may include YAML front-matter that overrides app and site configuration for that page alone:mergeData, which reads only non-configuration keys as page data. Configuration keys (include, exclude, meta, content, import_map, svg) are handled separately by mergeValue.
The merge cascade
Configuration is assembled in three passes:Site configuration — site.yaml
readSiteConf reads site.yaml from the project root. Applies the production block (if nue build), appends default skip patterns, and sets dist = .dist.App configuration — app.yaml
mergeConf(site_conf, app_conf) performs a structural clone of the site config and merges each app key. The meta and content keys are object-merged; all other cascading keys are replaced.| Key category | Merge strategy |
|---|---|
meta, content | Deep merge — each level adds/overrides individual sub-keys |
include, exclude | Replace — app or page value replaces the parent’s value |
import_map, svg | Replace |
Site-only keys in app.yaml | Ignored silently |
Non-ALL_CONF keys | Become template data variables |