Skip to main content

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.

Nue is designed for an instant start. If you have Bun installed, you can have a running site in three commands. This guide walks you through two paths: starting from a project template, and starting from a single file.
Nue requires Bun >= 1.2.2. If you haven’t installed Bun yet, see the installation guide first.

Start from a template

Templates give you a working project structure you can explore and modify immediately.
1

Create a project from a template

Run nue create with the name of a template and an optional directory name. The available templates are blog, minimal, spa, and full.
nue create blog my-blog
Nue downloads the template archive and extracts it into a new directory. You’ll see a success message with your next steps:
🎉  "blog" directory created. Your next steps:
   cd my-blog
   nue
If you omit the directory name, the project is created in a folder named after the template (e.g., blog/).
2

Enter the project directory

cd my-blog
3

Start the dev server

nue
This runs nue serve, which starts the development server with universal hot reload. Open the URL shown in your terminal — typically http://localhost:8080.Every change you save — Markdown, CSS, HTML layouts, site.yaml, JavaScript components — updates the browser instantly without a full refresh.

Available templates

minimal

Two files: index.html and index.css. The smallest possible Nue project. Start here if you want to build everything from scratch.

blog

A complete blog with posts, RSS feed, view transitions, and a design system. Uses site.yaml, a layout module, and a posts/ directory.

spa

A single-page application with JavaScript components, a CSS directory, and server-side routes. Shows the clean separation of UI and logic.

full

A complete multi-section site: blog, docs, contact form, admin area, and a 404 page. Demonstrates collections, import maps, and server reload.

Start from a single file

You don’t need a template. Nue starts from any directory that contains an index.html or index.md.
1

Create an index file

Create a Markdown file in a new directory:
mkdir my-site && cd my-site
2

Start the dev server

nue serve
Nue detects the index.md, renders it as HTML, and serves it at http://localhost:8080. No site.yaml, no package.json, no install step.
Running nue with no arguments is equivalent to nue serve. Nue defaults to the serve command if no command is specified.
3

Add styles and structure

As your site grows, add files alongside your content. Nue picks them up automatically:
my-site/
├── index.md          # Your content
├── index.css         # Global styles
├── layout.html       # Shared layout wrapper
└── site.yaml         # Site-wide configuration
Any CSS file in the project root is automatically applied to every page. No imports, no bundler config.

Build for production

When you’re ready to deploy, run:
nue build
Nue compiles all content and assets into a .dist/ directory. Use --clean to clear the output directory before building, and --verbose for detailed output:
nue build --clean --verbose
To preview the production build locally before deploying:
nue preview

Project structure after nue create blog

my-blog/
├── site.yaml          # Site-wide configuration and metadata
├── index.html         # Front page
├── index.css          # Global design system styles
├── layout.html        # Shared page layout
└── posts/             # Blog post Markdown files
The blog and full templates use site.yaml to configure metadata, RSS feeds, view transitions, and content collections. The minimal template skips site.yaml entirely — Nue infers everything it needs from the files present.

Next steps

Core concepts

Understand how Nue organizes projects and why the file-based structure matters.

Nuemark

Learn the extended Markdown syntax for rich, interactive content pages.

Design system

See how CSS layers and design tokens replace component-scoped styles.

CLI reference

Every command and option available in the nue CLI.

Build docs developers (and LLMs) love