Nue treats content as the primary artifact of a website. Rather than assembling pages from JavaScript components, you write Markdown — using the Nuemark format — and let layout modules and a CSS design system handle structure and presentation. This separation makes content portable, editable by non-developers, and naturally SEO-friendly, since there is no client-side JavaScript required to render any text.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.
What is a content site?
Content sites are any project where pages are driven by Markdown documents rather than programmatic UI. This includes:Documentation
Reference guides, API docs, tutorials — hierarchical content where readers navigate by topic.
Blogs
Time-ordered posts with metadata like
date, author, and tags that drive feeds and indexes.Marketing pages
Landing pages and product pages with rich layouts, responsive images, and calls to action.
Front pages
Home pages that pull content from multiple sections of the site using content collections.
Nuemark: content-first Markdown
Nue uses Nuemark as its Markdown format. It is a superset of CommonMark with built-in structures for modern web content. Standard Markdown gives you paragraphs, headings, lists, and links. Nuemark adds:- Automatic layout structures — sections, grids, stacks, and columns through indentation-based syntax, without any
<div>tags in your content - Built-in components — responsive images, videos, tables, and expandable elements that work out of the box
- Front matter — YAML metadata at the top of each file that drives page titles, dates, authors, and collection filtering
- Custom tags — developers define reusable tags once; content authors use them without any implementation knowledge
Layout modules
Layout modules are HTML files that define the structure wrapping your content. They live in@shared/ui/ (global) or in a ui/ subdirectory within an app directory (scoped).
A layout module receives your parsed Markdown content and page data as inputs, and returns a full HTML document:
<slot /> element is replaced by your rendered Markdown content. Everything else in the layout is driven by data from YAML files and front matter.
Layout modules are server-rendered. There is no client-side JavaScript involved in assembling the page structure. The browser receives complete, ready-to-read HTML.
Directory structure for a blog
Content collections
Collections let you aggregate Markdown pages matching a pattern and expose them as structured data for use in layouts and index pages. You define collections inapp.yaml (or site.yaml for site-wide collections):
| Key | Description |
|---|---|
include | Path patterns for pages to include |
sort | Field and direction, e.g. date desc |
require | Front matter fields that must be present |
tags | Only include pages with matching tags |
skip | Front matter fields that cause a page to be excluded |
CSS design system
Content sites in Nue use a global CSS design system to handle all visual presentation. There are no inline styles, no CSS-in-JS, and no component-scoped stylesheets. Your Markdown content outputs clean semantic HTML, and your design system decides how it looks. Global CSS files live in@shared/design/ and are automatically included on every page:
Sitemap and RSS feed generation
Nue generatessitemap.xml and feed.xml automatically during a build when you enable them in site.yaml.
Sitemap
sitemap.xml to .dist/. Each entry includes the page URL and its last-modified timestamp derived from the file’s mtime.
RSS feed
title, description, date (or pubDate), and url, then writes a standard RSS 2.0 feed.xml to .dist/.
How do I exclude a draft post from the sitemap?
How do I exclude a draft post from the sitemap?
Add
draft: true to the post’s front matter, then list draft in the sitemap.skip array in site.yaml. Nue will omit any page whose front matter contains a field listed in skip.Can a page belong to multiple collections?
Can a page belong to multiple collections?
Yes. Collections are defined independently, and a page can match multiple
include patterns across different collection definitions. Each collection resolves separately.How do I create a custom 404 page?
How do I create a custom 404 page?
Create
404.md at your project root. Nue builds it to .dist/404.html. Most hosting platforms serve this file automatically for unmatched routes.