Linux 软件免费装
Banner图

Umay AI Markdown

开发者 umayajans
更新时间 2026年11月1日 02:17
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

markdown geo llm llms-txt ai-agents

下载

1.1.1 1.2.0

详情介绍:

AI agents and assistants (ChatGPT, Claude, Perplexity, Gemini, coding agents such as Claude Code) read Markdown far more efficiently than HTML: no menus, scripts or styles, a fraction of the tokens. Umay AI Markdown gives every public page of your site a clean Markdown version and makes it easy for agents to find. Browsers, search engines and every client that does not ask for Markdown receive your normal, unchanged HTML. There is no settings page and no external service. Three ways agents get Markdown .md URLs and /llms.txt need pretty permalinks (Settings > Permalinks, anything but "Plain"). What agents receive Each Markdown document starts with YAML front matter (title, description, canonical URL, site, language, post type, author, published and modified dates, featured image, categories and tags), followed by the page content as Markdown. Structured data (JSON-LD) that your SEO plugin prints in the page head (Yoast SEO, Rank Math and others) or that sits in the content is appended as fenced json blocks, the same layout Cloudflare's "Markdown for Agents" uses. Navigation, headers, footers, sidebars, scripts, styles, forms and comment areas are removed; tables become Markdown tables, embedded videos and maps become links, and root-relative links become absolute. Key features Filters Action: do_action( 'umay_mdn_flush' ) clears the Markdown cache.

安装:

  1. Install from Plugins > Add New, or upload the ZIP via Plugins > Add New > Upload Plugin.
  2. Activate the plugin. There is no settings page; it works immediately.
To verify: curl -H "Accept: text/markdown" https://your-site.com/ curl https://your-site.com/index.md curl https://your-site.com/llms.txt The first two return Content-Type: text/markdown; charset=utf-8 with YAML front matter and a Markdown body.

屏幕截图:

  • Built-in cache: the first request is rendered (`X-Cache: MISS`), the next one is served from the cache (`X-Cache: HIT`). `X-Markdown-Tokens` estimates the size for the agent.
  • Content negotiation on one URL: browsers get `text/html` with a `Link` header pointing to the Markdown version; AI agents get `text/markdown` with a canonical link.
  • Discovery: every HTML page advertises its `.md` twin in `<head>`, and the `.md` URL returns Markdown without any special header (`noindex`, canonical link to the HTML page).
  • The automatically generated `/llms.txt`, listing pages and posts with links to their Markdown versions and their excerpts.

升级注意事项:

1.2.0 Security update: password-protected posts were exposed as Markdown, and page caches could serve Markdown to browsers. Adds .md URLs, an automatic /llms.txt and richer metadata. The cache clears itself after the update. 1.1.1 Aligned text domain with plugin slug (markdown-negotiator), hardened Markdown output escaping for Plugin Check compliance, and switched distribution language files to English POT-only. 1.1.0 Plugin renamed to "Umay AI Markdown" (slug markdown-negotiator). Removes deprecated libxml calls and refactors the output buffer pipeline for WordPress.org compliance. After upgrading, deactivate and re-activate to flush the cache. 1.0.1 Cleaner Markdown output: strips inline page-builder CSS, fixes lazy-loaded images, removes JavaScript pop-up links, and adds translation support. 1.0.0 First public release.

常见问题:

Does it slow down my site?

No. For normal visitors the plugin only checks the Accept header and adds two small hints (a <link> tag and a Link header). Markdown is generated only when an agent asks for it, and then cached.

Does this plugin contact any external services?

No. It makes no external requests, sends no analytics and loads no remote assets. All conversion happens on your server with the bundled league/html-to-markdown library.

Does it work with LiteSpeed Cache, WP Rocket, W3 Total Cache or Cloudflare?

Markdown responses are never stored by page caches: the plugin defines DONOTCACHEPAGE, tells LiteSpeed Cache not to cache the response and sends no-store headers, so browsers never receive Markdown from a cache. The .md URLs and /llms.txt always work, because they are separate addresses. Content negotiation on the same URL (the Accept header) also requires the cache to tell agents and browsers apart. HTML responses carry Vary: Accept, which caches such as Varnish, nginx and browsers honor. A full-page cache that ignores Vary may hand its cached HTML to an agent that asked for Markdown; the agent still gets correct content, and it can use the advertised .md URL. To negotiate on the same URL behind such a cache, configure it to bypass (or vary on) requests whose Accept header contains text/markdown, for example with a Cloudflare Cache Rule.

My SEO plugin also creates llms.txt. Which one is used?

If a physical llms.txt file exists in your site root (Yoast SEO's llms.txt feature writes one), the web server serves that file and this plugin's version is not used. To use this plugin's version, turn off the llms.txt feature of the SEO plugin and delete the file. To keep the SEO plugin's file, you can disable ours with add_filter( 'umay_mdn_llms_txt', '__return_false' );.

Is the Markdown indexed by search engines? Will it cause duplicate content?

No duplicate content is created. Negotiated Markdown is served on the page's own URL and carries a Link: rel="canonical" header. The .md URLs additionally send X-Robots-Tag: noindex and point to the HTML page as canonical.

Are password-protected or private posts exposed?

No. Password-protected posts are never served as Markdown, not even to visitors who entered the password, and private, draft, scheduled and trashed content is never served to visitors. Negotiated Markdown is only generated for visitors who are not logged in; logged-in users can preview .md URLs of content they are allowed to see, and those responses are never cached. Responses for visitors carrying cookies (other than common analytics and CDN cookies) are never cached either, so content a membership plugin unlocks by cookie stays with that visitor. llms.txt summaries come only from manual excerpts, so text of restricted posts is not quoted there; posts hidden by your own access rules can be left out with the umay_mdn_llms_include filter.

Does it respect maintenance mode, coming-soon pages and login walls?

Yes. Markdown is produced at the very end of WordPress's request handling: plugins that redirect (login walls), set an error status such as 503 (maintenance) or switch to their own template (coming-soon pages) apply first, and the agent receives what a visitor would see.

How do I state my AI usage preferences (Content Signals)?

Add a filter, for example in a small plugin or your theme's functions.php: add_filter( 'umay_mdn_content_signal', function () { return 'search=yes, ai-input=yes, ai-train=no'; } ); The value is sent as a Content-Signal header with every Markdown response and added under User-agent: * in the robots.txt that WordPress generates. A physical robots.txt file is not changed.

How is the cache cleared?

Automatically: the affected URLs (post, home page, archives, author and term pages, llms.txt) when a post changes; everything after a theme switch, a menu or term edit, a plugin/theme/core update, or deactivation. To clear it manually run do_action( 'umay_mdn_flush' );, for example with WP-CLI: wp eval 'do_action( "umay_mdn_flush" );'.

更新日志:

1.2.0 1.1.1 1.1.0 1.0.1 1.0.0