Vendored Markdown: Turning MDX into plain Markdown for LLM consumption
summary
Cloudflare converts MDX-heavy docs into compact Markdown using the rehype & remark ecosystem, running MDX through Astro to HTML and then a custom pipeline MDX → Astro → HTML → rehype → remark that rewrites 124 Astro components and a heavily used render component (2–3k uses) into readable text. The site has 6,680 MD files (5,617 pages); one Get Started page drops from ~15,200 input tokens down by sevenfold, and the approach saves ~38% of tokens versus off‑the‑shelf converters — called vendor markdown.
AI-written summary · about
