🎉 Use coupon MYXERO to enjoy 20% recurring discount on any plan. View Pricing
Umay AI Markdown
Umay AI Markdown

Umay AI Markdown

0/5 (0 ratings) — active installs Updated May 7, 2026
Markdown response served when an AI agent requests <code>Accept: text/markdown</code> — full HTTP headers (Content-Type, Vary, X-Cache, X-Robots-Tag, X-Content-Type-Options, X-Markdown-Generator), followed by a YAML frontmatter block (title, site, URL, generated timestamp) and the converted Markdown body.

Markdown response served when an AI agent requests <code>Accept: text/markdown</code> — full HTTP headers (Content-Type, Vary, X-Cache, X-Robots-Tag, X-Content-Type-Options, X-Markdown-Generator), followed by a YAML frontmatter block (title, site, URL, generated timestamp) and the converted Markdown body.

Modern AI agents (ChatGPT, Claude, Perplexity, Gemini, etc.) work much better with Markdown than HTML. Umay AI Markdown inspects the incoming Accept header and, only when text/markdown is requested, intercepts the response and serves a clean, agent-friendly Markdown representation of the page.

Browsers, search engines, and any client that does not explicitly ask for Markdown receive the unchanged HTML response. There is no settings page, no cron job, and no external service call.

Key features

  • Zero configuration — install, activate, done.
  • Only triggers when Accept: text/markdown is present. Regular visitors and search engines are never affected.
  • Hybrid content extraction: uses the_content for posts/pages, falls back to a DOM-based extractor for archives, taxonomies, and the homepage.
  • Powered by the industry-standard league/html-to-markdown library.
  • Transient-cached for 12 hours per URL (sha256-keyed). Auto-invalidated on save_post, term edits, theme switches, and menu updates.
  • Built-in IP rate limiter (30 requests / minute by default) to mitigate abuse.
  • Strict input sanitization, header injection protection, libxml entity hardening (XXE-safe), and full WordPress Coding Standards compliance.
  • PSR-4 autoloaded, namespaced OOP code. No globals.
  • Sends Vary: Accept, X-Robots-Tag: noindex, and X-Content-Type-Options: nosniff on every Markdown response.

What gets sent to AI agents

Each Markdown response includes a YAML front-matter block with the page title, site name, canonical URL, and ISO-8601 generation timestamp, followed by the page body converted to Markdown. Navigation, footer, sidebars, scripts, styles, comment forms, related posts, and other page chrome are stripped before conversion.

Filters

Two filters are available for advanced customization:

  • umay_mdn_bypass — Return true to skip Markdown handling for the current request.
  • umay_mdn_cache_ttl — Override the default 12-hour cache lifetime (in seconds, minimum 60).
  • umay_mdn_rate_limit — Override the default 30-requests-per-minute rate limit.
  • umay_mdn_converter_options — Modify the league/html-to-markdown converter options array.