{"repo":"yazinsai/site-md","free":true,"listed":false,"github":"https://github.com/yazinsai/site-md","clone":"git clone https://github.com/yazinsai/site-md.git","description":"Serve clean Markdown from your Next.js site to AI agents, crawlers, and LLMs. Humans get HTML, agents get clean Markdown of the same pages. Two-file install.","language":"TypeScript","stars":58,"topics":["ai-agents","content-negotiation","crawler","llm","llms-txt","markdown","middleware","nextjs","seo","typescript"],"license":"MIT","category":"ai-agents","readme_excerpt":"site-md Serve clean Markdown from your Next.js site — for AI agents, crawlers, and LLMs. Your human visitors keep getting HTML. AI agents get fast, clean Markdown of the same pages. npx site-md — installs, wires up middleware, merges your next.config. No content duplication. No rewrites. Install · How it works · Config · Troubleshooting --- --- Install in one command That's it. The CLI detects your package manager (pnpm / npm / yarn / bun) and src/ layout, installs site-md , and wires up everything: - Writes middleware.ts — or AST-merges into your existing one, preserving your logic and matcher. - Writes app/api/site-md/[...path]/route.ts . - Wraps your next.config.{ts,mjs,js,cjs} with withNextMd — or creates one if absent. Then restart your dev server and try: Non-interactive mode For CI or agent scripts: Manual install If you'd rather wire it up yourself, the CLI's output is just these three files: middleware.ts (or src/middleware.ts ) app/api/site-md/[...path]/route.ts next.config.mjs (optional — enables /llms.txt and /llms-full.txt ) Do not use a folder starting with (e.g. site md ) for the route — Next.js App Router treats underscore-prefixed folders as private and silently excludes them from routing. --- How detection works A request is treated as \"agent\" and served Markdown when any of these match (first wins): Trigger Example --------------------------------------- ---------------------------------------- Path ends with .md /docs.md , /blog/post.md ?format=md query pa","default_branch":null,"files":null,"tree":[],"storefront":"/r/yazinsai","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yazinsai/site-md/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}