Open source · v0.3.0 · Astro 4–7

Markdown for Agents.
Built for Astro.

Serve clean Markdown at request time, generate static .md pages, and publish llms.txt—without requiring a paid Cloudflare plan.

Zero runtime dependencies. Normal browser responses stay unchanged.

astro.config.mjs

$ pnpm add @puralex/astro-markdown-for-agents

import markdownForAgents
  from '@puralex/astro-markdown-for-agents';

export default defineConfig({
  integrations: [markdownForAgents()]
});
Markdown routes ready/llms.txt

Two delivery modes

One integration. Static and server-rendered sites.

Delivery behavior stays explicit. Runtime sites negotiate by HTTP header. Static hosts expose generated Markdown files directly.

01 / Runtime

Content negotiation for SSR

Requests containing Accept: text/markdown receive converted Markdown. HTML, JSON, images, and browser traffic pass through.

curl -H "Accept: text/markdown" \
  https://your-site.dev/docs
  • Cloudflare Workers
  • Node, Vercel, Deno
  • Correct Vary headers

02 / Static

Markdown files at build time

Every generated HTML page gets a matching .md file. The llms.txt index maps the full machine-readable site.

dist/
├── index.html
├── index.md
├── docs/index.md
└── llms.txt
  • GitHub Pages and static hosts
  • No runtime function required
  • Optional host rewrite for negotiation

Measured demo

Navigation noise out. Content structure in.

This output is generated during the documentation build by the same converter exported in the npm package.

HTML input368 bytes
<nav><a href="/">Docs</a><a href="/pricing">Pricing</a></nav>
<main>
  <h1>Deploy an Astro site</h1>
  <p>Build fast, content-driven websites with clean output.</p>
  <h2>Install</h2>
  <pre><code>pnpm create astro@latest</code></pre>
  <ul><li>Zero client JavaScript by default</li><li>Deploy anywhere</li></ul>
</main>
<footer>Copyright and navigation noise</footer>
Markdown output179 bytes
# Deploy an Astro site

Build fast, content-driven websites with clean output.

## Install

```
pnpm create astro@latest
```

- Zero client JavaScript by default
- Deploy anywhere

Start in one command

Make your Astro site readable by agents.

Then choose runtime negotiation, static files, or both.

pnpm add @puralex/astro-markdown-for-agentsnpm ↗

Choose with evidence

How approaches compare.

CapabilityThis integrationCloudflare featureDIY build script
Runtime negotiationYes, with SSRYesHost-specific
Static .md filesYesNoYes
llms.txtGeneratedManualManual
Cloudflare FreeYesNoYes
Runtime dependenciesNoneManaged serviceVaries
Astro-aware buildYesNoUsually not

Cloudflare comparison reflects its published Pro, Business, and Enterprise availability.

Practical guides

Ship it on your stack.

Early adopter program

Running Astro docs in production?

We are recruiting the first ten public deployments. Get setup help, benchmark review, and a permanent link from this project.

Apply with your siteStar on GitHub