Nue uses a file-based model where your directory layout directly drives what gets built and how. Instead of configuring entry points and asset graphs by hand, you place files in the right locations and Nue infers the rest. A project can be as minimal as a singleDocumentation 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.
index.html or index.md file, and scale to a multi-app site with shared layouts, global CSS, and content collections — all without changing how you configure the build.
Entry points
Nue recognizes two valid entry points for a project:site.yaml— Presence of this file at the project root identifies the directory as a Nue site and provides global configuration. Nue reads this file first when starting the dev server or build.index.htmlorindex.md— When nosite.yamlexists, Nue looks for one of these files at the root. If neither is found, the directory is not treated as a Nue project.
Directory conventions
@shared/
Global assets used across all pages and apps. Nue automatically includes files from
@shared/design/, @shared/ui/, and @shared/data/ in every page.App directories
Any subdirectory containing an
index.html or Markdown files is treated as a self-contained app. Assets in that directory are scoped to its pages..dist/
The output directory for all builds. Generated automatically at the project root. Never commit this directory to version control.
Root-level files
CSS, JS, and HTML files placed directly at the project root are treated as global assets and are included in every page.
The @shared/ directory
The @shared/ directory has several well-known subdirectories, each with a specific role:
@shared/design/, @shared/ui/, and @shared/data/ are auto-included in every page. The server/ and test/ subdirectories are excluded from all builds.Example directory tree
A typical content site with a blog looks like this:index.html as the entry point:
File discovery with fswalk
When Nue starts, it walks the entire project tree using fswalk, then hands the list of paths to sortAssets before creating asset objects from each file. The sort order determines which files are processed first and how style/component precedence is resolved.
Asset priority is assigned as follows:
| Priority | Rule | Example |
|---|---|---|
| 0 (highest) | Files in @shared/ | @shared/design/tokens.css |
| 1 | Files in subdirectories | blog/post.md |
| 2 (lowest) | Root-level files | index.md, global.css |
The skip list
Nue ignores certain files during the walk. The default skip list is:site.yaml:
App-level configuration
Each app directory can contain anapp.yaml file to override site-level settings for pages in that directory. Configuration is merged, with app-level values taking precedence over site-level values for include, exclude, meta, and content keys.
How dependencies are resolved
When Nue renders a page, it callslistDependencies from deps.js to compute the full set of assets needed for that page. The rules are:
Root-level files are global
Any
.html, .js, .ts, .yaml, or .css file placed directly at the project root is included in every page.@shared/ subdirectories are auto-included
Files under
@shared/design/, @shared/ui/, and @shared/data/ are always included. Files under @shared/lib/, @shared/app/, and @shared/server/ are not.SPAs use their entire directory tree
For
index.html SPA entry points, all assets in the same directory and its subdirectories are included.The .dist/ output directory
All build output goes to .dist/ at the project root. The output mirrors the source directory structure, with these transformations applied:
.mdfiles are compiled to.html.tsfiles are compiled to.js.htmlfiles containing dynamic components (is_dhtml: true) are compiled to.html.js- CSS is minified in production builds
sitemap.xmlandfeed.xmlare generated when enabled insite.yaml