accept.md

Serve Markdown from pages you already have

Send Accept: text/markdown to any route and get clean Markdown back — for crawlers, exports, and syndication.

HTTP exchange
GET /docs/installation HTTP/1.1
Accept: text/markdown

→ 200 text/markdown

---
title: Installation
description: Install accept-md...
---

# Installation

Run from your project root...

How negotiation works

Your components stay untouched. Next.js rewrites or SvelteKit hooks route Markdown requests internally.

Negotiate

A rewrite, handler, or SvelteKit hook detects Accept: text/markdown.

Render

Your app renders the page once as HTML.

Return

The handler converts HTML to Markdown and strips layout chrome.

Install

Run from your project root. The CLI detects your framework, configures rewrites and handlers, and wires up Markdown negotiation.

Your project root
$ npx accept-md init

# Then install deps
$ pnpm install

Installation guide — or browse framework integrations.