kasin-it / next-md-negotiate
PublicContent negotiation for Next.js — serve Markdown to LLMs and HTML to browsers from the same URL.
A library for Next.js apps that serves HTML pages to web browsers and Markdown text to AI agents and crawlers from the same URLs based on request preferences.
How It Works
You build a beautiful website with pages for products and blog posts that look perfect for human visitors.
AI assistants and crawlers need simple, clean text versions of your pages instead of fancy web layouts.
You easily include a helpful tool in your website project to handle different visitor needs.
You note down quick ways to generate plain text summaries for pages like products or blogs.
You add a quiet background spot that provides the plain text when specifically requested.
With one simple adjustment, your site now detects and switches between views automatically.
Open your page in a browser for the pretty view, or act like an AI to receive clean text – it switches seamlessly!
Your website now happily serves beautiful pages to people and easy text to AI from the exact same addresses.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.