Nuemark is the content authoring format at the heart of Nue. It solves a real problem: standard Markdown is too limited for modern web pages, while MDX entangles content with JavaScript. Nuemark takes a third path — extending Markdown with purpose-built syntax for layouts, media, and interactive components, without requiring authors to write or understand any code.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.
How Nuemark extends Markdown
Standard Markdown handles paragraphs, headings, lists, and links well. Nuemark keeps all of that and adds three layers on top: structural layouts through indentation-based syntax, built-in components for rich media, and a custom tag extension system that developers define and authors use.Full Markdown compatibility
Everything from CommonMark works, plus tables, footnotes, and syntax-highlighted code blocks.
Layout primitives
Sections, grids, stacks, and columns through clean indentation. No div soup or CSS class strings.
Built-in components
Responsive images with
<picture> srcset, video embeds, expandable accordions, and data tables.Custom tag system
Developers define custom tags once; authors use them everywhere without touching any code.
Section and grid layouts
Nuemark uses indentation to create structural layouts. A thematic break (---) inside an indented block creates a new section. The parser detects when a tag body contains multiple ----separated blocks and sectionizes them automatically.
[grid], [stack], and [block] tags each render their sectionized content differently. [block] wraps each section in a <div>, while [grid] and [stack] apply CSS layout semantics via class names. Tags can carry HTML attributes directly:
Built-in components
Nuemark ships with a library of built-in tags for common content needs. All are invoked with the[tagname] syntax on its own line, with optional inline arguments.
Responsive images
The[image] tag (or the [!] shortcut) renders an accessible <figure> with lazy loading. When you provide both a small and a large source, it generates a <picture> element with <source> tags and a max-width media query:
Video embeds
The[video] tag renders a native <video> element with support for autoplay, controls, loop, muted, and poster attributes:
Expandable content
The[accordion] tag renders <details>/<summary> elements. Each section (separated by ---) becomes one collapsible panel. Set open: 0 to have the first panel open by default:
Tables
Nuemark supports both inline pipe syntax and the[table] tag. The tag version accepts a YAML data block:
Definition lists
The[define] tag creates semantic <dl> lists, useful for glossaries and FAQs:
Custom tag extension system
The custom tag system is how Nue bridges the gap between developers and content authors. Developers define tags once in JavaScript; authors use them in Markdown with no code knowledge required. When a tag name is not found in Nuemark’s built-in set, the renderer callsrenderIsland, which emits a custom HTML element with a nue attribute and any provided data serialized as an inline JSON <script>:
[pricing-table] tag as a Nue HTML component. An author uses it in any Markdown file:
Passing data to custom tags
Tag arguments come in two forms. Inline values go on the same line as the tag name; YAML data blocks go in the indented body:: resolve against page data rather than taking a literal value. This lets tags reference datasets defined in YAML files:
pricing_tiers would be a key in the page’s data context, making the tag render dynamically from an external data source.
Front matter metadata
Every Nuemark document can begin with a YAML front matter block. Metadata defined here is merged into the page’s data context and available to layouts and custom tags:<head> for SEO (title, description), into layout components (for page headers and navigation), and into the template data context.
Contrast with MDX
MDX: content mixed with code
MDX: content mixed with code
MDX lets you use JSX in Markdown, which means import statements and component logic appear inside content files:Non-technical editors risk breaking builds when touching these files. Component updates require touching every content file that imports them.
Nuemark: content stays clean
Nuemark: content stays clean
In Nuemark, the same result uses no imports and no code. The tag system handles the bridge between content and components:The
pricing dataset comes from a YAML file in @shared/data/. The chart component is defined once by a developer and available everywhere. Authors never touch JavaScript.Parsing and rendering API
Thenuemark package exports two primary functions:
parseNuemark returns a document object with meta (front matter), headings (list of heading objects with level, text, and id), and a render() method that accepts rendering options including custom tags and page data.
Custom tags registered in
opts.tags override built-in tags of the same name, letting you replace default rendering for specific elements in your project.