Nizel
A Markdown content processor for modern applications.
Turn Markdown into structured content your app can use — HTML, frontmatter, TOC, headings, links, images, plain text, excerpts, reading time, and a full AST.
One call. One result object. Everything you need.
Install
npm install nizel
Quick Start
import { useNizel } from 'nizel';
const nizel = useNizel();
const { html, meta, toc, title, readingTime } = await nizel(`
---
title: Hello World
description: My first Nizel page
---
# {{ meta.title }}
Welcome to **Nizel**.
`);
Why Nizel
Most Markdown parsers answer one question: how do I turn Markdown into HTML?
Nizel answers a more useful question: how do I turn Markdown into structured content my app can use?
In real products, Markdown usually needs more than rendered HTML. It needs metadata, frontmatter, slugs, anchors, TOC generation, custom blocks, design-system classes, safe links, variables, filters, and plugin-based extension points.
Nizel is not a parser with a nicer name. It is a content engine with Markdown as its input format. The parser is an implementation detail. The public value is the stable content model and the simple API.
CommonMark Compliant
Nizel passes the full CommonMark 0.31 specification test suite — all 652 tests.
CommonMark is the only standardized, cross-implementation Markdown specification. It defines exactly how Markdown should parse and render, removing the ambiguity that plagues most parsers.
Compliance means your content renders consistently. No surprises. No edge cases. What you write is what you get.
What You Get
- Markdown to HTML
- Frontmatter extraction with typed metadata
- Template variables with built-in filters from
@sil/formatand@sil/case - Table of contents generation
- Heading anchors and slugs
- Plain-text extraction and excerpts
- Reading-time calculation
- Link and image extraction
- Element customization
- AST transforms
- Plugin system with beforeParse, transform, and afterRender hooks
- Safe output defaults
- Presets for blog, docs, email, and minimal usage
Explore the Docs
- Getting Started — install, configure, and run your first parse
- API Reference — every option and return value
- Pipeline — the processing order from input to result
- Result Object — what you get back from a parse call
- Template Variables — inject data into your Markdown
- Filters — built-in formatting and case transforms
- Frontmatter — extract and use metadata
- Table of Contents — automatic heading collection
- Elements — customize HTML output
- Plugins — extend Nizel with your own logic
- Plugin Packages — first-party plugin reference pages
- Presets — blog, docs, email, and minimal bundles
- Safety — safe output defaults
- Testing — test suite and conformance
- Release Notes — version history