npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mkdnsite

v1.4.5

Published

Markdown for the web. HTML for humans, Markdown for agents.

Downloads

1,955

Readme


mkdnsite serves a directory of Markdown files as a fully styled website — instantly, with no content build pipeline. The same URL delivers rendered HTML to browsers and raw Markdown to AI agents, using standard HTTP content negotiation.

One source. Two audiences. Zero build steps.

# Install
bun add -g mkdnsite     # or: npm i -g mkdnsite

# Serve any directory of .md files
mkdnsite ./docs

# That's it. Open http://localhost:3000
# For humans → beautiful HTML
curl http://localhost:3000

# For AI agents → raw Markdown
curl -H "Accept: text/markdown" http://localhost:3000

# Content index for LLMs
curl http://localhost:3000/llms.txt

Why mkdnsite?

The web has a Markdown problem. Everyone writes in Markdown — docs, blogs, READMEs, notes — but to put it on the web, you feed it through a static site generator, wait for a build, and ship HTML. Then when AI agents come along, services like Cloudflare and Vercel convert that HTML back into Markdown.

That's a round trip that shouldn't exist.

Traditional:   Markdown → build step → HTML → reverse-convert → Markdown (for AI)
mkdnsite:      Markdown → serve it.

mkdnsite skips the content build pipeline. Your .md files are served directly — rendered as HTML for browsers, delivered as raw Markdown for agents. No static site generation. No build artifacts. No HTML-to-Markdown reconversion.

Traditional SSGs earn their complexity through build-time optimizations — image processing, bundling, prefetching. mkdnsite trades that for radical simplicity and native AI agent support. If your content is Markdown and your audience includes both humans and machines, you don't need a build step in between.

What this means in practice

  • Edit a file, refresh the page. Not just in dev — in production too. No rebuild, no redeploy.
  • AI agents get your original Markdown, not HTML converted back to Markdown.
  • Your content stays portable. Markdown files in a directory. Move them anywhere.
  • Serve from GitHub. Point mkdnsite at any public or private repo with --github owner/repo.

Features

Rendering & Content

  • 🚀 Zero build step — runtime Markdown → HTML via React SSR
  • 🤝 Content negotiationAccept: text/markdown returns raw Markdown, text/html returns rendered pages
  • 📄 GitHub-Flavored Markdown — tables, task lists, strikethrough, autolinks
  • ⚠️ GFM Alerts[!NOTE], [!TIP], [!IMPORTANT], [!WARNING], [!CAUTION]
  • Math rendering — KaTeX via SSR (no client-side JS required)
  • 📊 Mermaid diagrams — rendered client-side from fenced code blocks
  • 📈 Chart.js charts — interactive charts from JSON in fenced code blocks
  • 🎨 Syntax highlighting — client-side via Prism.js (default) or server-side via Shiki
  • 📋 Copy-to-clipboard — on all code blocks
  • 🔍 Full-text search — ⌘K search modal with TF-IDF ranking and result highlighting

Theming & Design

  • Beautiful by default — shadcn/Radix-inspired typography with light/dark mode
  • 🌗 Theme toggle — sun/moon button with animated circular reveal (View Transitions API)
  • 🎨 Custom colors, fonts, and CSS — via config or external stylesheets
  • 🖼️ Logo and branding — configurable logo, logo text, and accent colors
  • 📑 Auto-navigation — sidebar built from your file/directory structure
  • 📖 Table of contents — per-page ToC from heading structure
  • ⏮️ Previous/next links — page-to-page navigation

AI & Interoperability

  • 🤖 Auto /llms.txt — AI agents discover and index your content
  • 🔌 Built-in MCP server — Model Context Protocol endpoint for AI tools (Claude Desktop, Cursor, etc.)
  • 📊 x-markdown-tokens header — Cloudflare-compatible token count
  • 📡 Content-Signal header — AI training and indexing consent signals
  • 📄 YAML frontmatter — title, description, order, tags, draft status

Infrastructure

  • 🌐 Multi-runtime — runs on Bun, Node 22+, and Deno
  • 📂 Filesystem routing — directory structure = URL structure
  • 🐙 GitHub content source — serve directly from a GitHub repo (public or private)
  • 🔒 HTML sanitization — safe HTML passthrough via rehype-sanitize
  • ⚙️ Pluggable rendering — custom React components per Markdown element
  • 🛡️ Content Security Policy — configurable CSP headers
  • 🔧 Config parity — every option works in mkdnsite.config.ts and as a CLI flag

Quick Start

Install

bun add -g mkdnsite     # Bun (recommended)
npm i -g mkdnsite       # requires Node 22+

No JavaScript runtime installed? No problem:

  • Prebuilt binaries — download a standalone executable from GitHub Releases (Linux, macOS, Windows)
  • Dockerdocker run -v ./docs:/content -p 3000:3000 nexdrew/mkdnsite (Docker Hub)

Serve a directory

mkdnsite ./my-docs

Any directory of .md files works. mkdnsite builds navigation from the file structure, renders pages on request, and serves static assets.

Serve a GitHub repo

mkdnsite --github owner/repo
mkdnsite --github owner/repo --github-path docs

Serve content directly from a public GitHub repository — no clone needed.

Also works on Deno:

deno run --allow-read --allow-net src/cli.ts ./my-docs

Configuration

Create mkdnsite.config.ts for full control:

import type { MkdnSiteConfig } from 'mkdnsite'

export default {
  contentDir: './docs',
  staticDir: './static',
  site: {
    title: 'My Documentation',
    description: 'Docs for my project.',
    url: 'https://docs.example.com'
  },
  theme: {
    colorScheme: 'system',
    logo: { src: '/logo.svg', alt: 'My Project' },
    logoText: 'My Project',
    showNav: true,
    showToc: true,
    prevNext: true
  },
  client: {
    themeToggle: true,
    math: true,
    mermaid: true,
    search: true,
    copyButton: true
  }
} satisfies Partial<MkdnSiteConfig>

Or use CLI flags — every config option has a corresponding flag:

mkdnsite ./docs --port 8080 --title "My Docs"
mkdnsite ./docs --color-scheme dark --no-theme-toggle
mkdnsite ./docs --logo /logo.png --logo-text "My Project"
mkdnsite ./docs --no-math --no-mermaid --no-search

See the full configuration reference for all options.

Hosted Service — mkdn.io

Don't want to self-host? mkdn.io runs mkdnsite for you — connect your GitHub repos, get a live site with custom domains, analytics, and zero infrastructure.

| | GitHub Pages | mkdn.io | |---|---|---| | Content pipeline | Jekyll build or Actions | No build — serves Markdown directly | | AI agent support | Manual setup | Built-in content negotiation + MCP | | Content format | Builds and ships HTML | Serves Markdown, renders HTML | | LLMs.txt | Manual | Auto-generated | | Theme ecosystem | Thousands of Jekyll themes | Config-based theming (growing) | | Maturity | Battle-tested since 2008 | New project |

mkdn.io is best for documentation sites and blogs where AI agent access and simplicity matter more than deep theme customization. Get started free →

Content Negotiation

mkdnsite implements the same content negotiation standard used by Cloudflare and Vercel — but in the opposite direction. Instead of converting HTML to Markdown for AI, mkdnsite starts with Markdown and renders HTML for humans.

| Client | What it sends | What it gets | |---|---|---| | Browser | Accept: text/html | Rendered HTML page | | Claude Code | Accept: text/markdown | Raw Markdown | | Cursor | Accept: text/markdown | Raw Markdown | | Any URL + .md suffix | — | Raw Markdown | | /llms.txt | — | AI content index | | /mcp | — | MCP server endpoint |

Programmatic API

Use mkdnsite as a library in any JavaScript runtime:

import {
  createHandler, resolveConfig,
  FilesystemSource, createRenderer
} from 'mkdnsite'

const config = resolveConfig({
  site: { title: 'My Site' }
})
const source = new FilesystemSource('./content')
const renderer = await createRenderer('portable')
const handler = createHandler({ source, renderer, config })

// Works with any platform's serve API
Bun.serve({ fetch: handler, port: 3000 })

Contributing

Contributions are welcome! See open issues for the roadmap and current priorities.

Links

License

MIT