Nue separates content from configuration from data. Pages are written in Markdown or HTML. Configuration lives in YAML files. Datasets live in their own YAML or JSON files that get merged into the page’s data context at render time. This separation means a marketing writer can update copy, a developer can change page structure, and a data analyst can update charts — all without touching each other’s files.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.
YAML data files
Any.yaml file in your application directory is loaded as data and merged into the page context. Keys that don’t match reserved configuration properties (include, exclude, meta, content, import_map, svg) become available as template variables in your layouts and components.
app.yaml for per-application configuration
Each application directory can have anapp.yaml file that configures the layout and behavior for that section of the site. It merges with the global site.yaml using mergeConf, where array values like include and exclude are fully replaced (not appended), and object values like meta and content are shallow-merged:
include array tells Nue which CSS and JS files to load for pages in this application. content.heading_ids adds id attributes to headings for anchor links. content.sections wraps ----separated Nuemark blocks in <section> elements.
app.yaml configuration is resolved per-page at render time by traversing the asset’s dependency graph to find the nearest app.yaml. A page in blog/posts/ inherits the blog/app.yaml settings.@shared/data/ for shared datasets
Data files in@shared/data/ are available to all applications in the site. They are loaded by mergeSharedData in site.js and merged into every page’s data context:
Content collections
Content collections let you query a set of Markdown files and present them as structured data — for blog indexes, documentation listings, or any page that aggregates content from multiple files. Collections are defined insite.yaml or app.yaml under the collections key. Each entry maps a collection name to a configuration object:
posts) becomes a key in the page data context, containing an array of page objects ready to iterate over in templates.
The getCollections API
ThegetCollections function in collections.js processes collection definitions against the full list of site files:
include
Theinclude array specifies path patterns. Any file whose path contains one of the patterns is included as a candidate:
blog/ to include all posts, or more specific paths like blog/2025/ to include only one year’s posts.
require
require filters out any page that is missing one or more specified front matter fields. This ensures collection items always have the metadata your template depends on:
date in its front matter will not appear in the posts collection.
tags
tags filters to pages whose front matter tags array contains at least one of the specified values:
skip
skip excludes pages where any of the specified front matter fields is truthy. Use this to exclude draft posts, private pages, or featured items that appear elsewhere:
draft: true or featured: true in its front matter will not appear in the listing.
sort
sort is a string with the field name and optional direction (asc or desc). The default direction is ascending:
Collection items
Each item in a collection array contains all front matter fields from the source Markdown file, plus three routing properties added by the system:| Property | Description |
|---|---|
url | The page’s URL path (e.g., /blog/hello-world) |
dir | The directory containing the file (e.g., blog) |
slug | The filename without extension (e.g., hello-world) |
Modifier scripts
Modifier scripts are JavaScript or TypeScript files in@shared/data/ (files not ending in .test). They export a default async function that receives the merged data object and can transform it in place. This is where you add computed properties, filter arrays, or fetch external data.
@shared/data/ run in sequence. Files are loaded in filesystem order, so name them with numeric prefixes if order matters:
Full data flow example
Here is how all data sources combine for a blog post:Site-wide data loads first
site.yaml provides global configuration. @shared/data/*.yaml files add shared datasets (navigation, authors, etc.).Application data merges in
blog/app.yaml and any other .yaml files in blog/ merge their non-configuration keys into the page data context.Front matter from the page itself
The Markdown file’s front matter (title, date, author, tags) is merged last, so page-level values take priority over inherited ones.
Collections resolve
If
collections is configured, Nue queries matching Markdown files, applies require/tags/skip filters, sorts results, and adds the arrays to the data context.