{"id":296119,"date":"2026-04-22T10:34:30","date_gmt":"2026-04-22T10:34:30","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/markdown-for-agents-and-statistics\/"},"modified":"2026-05-07T14:25:38","modified_gmt":"2026-05-07T14:25:38","slug":"markdown-for-agents-and-statistics","status":"publish","type":"plugin","link":"https:\/\/bs.wordpress.org\/plugins\/markdown-for-agents-and-statistics\/","author":23473288,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.4.2","stable_tag":"1.4.2","tested":"7.0","requires":"6.3","requires_php":"8.1","requires_plugins":null,"header_name":"Markdown for Agents and Statistics","header_author":"The Chancery Lane Project","header_description":"Serve pre-generated Markdown files to AI agents via HTTP content negotiation, with access statistics.","assets_banners_color":"707995","last_updated":"2026-05-07 14:25:38","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/labs.chancerylaneproject.org\/project\/wordpress-markdown-for-agents\/","header_author_uri":"https:\/\/chancerylaneproject.org","rating":5,"author_block_rating":0,"active_installs":20,"downloads":212,"num_ratings":1,"support_threads":1,"support_threads_resolved":1,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.3.0":{"tag":"1.3.0","author":"chancerylaneproject","date":"2026-04-22 10:31:28"},"1.4.1":{"tag":"1.4.1","author":"chancerylaneproject","date":"2026-05-06 17:09:05"},"1.4.2":{"tag":"1.4.2","author":"chancerylaneproject","date":"2026-05-07 14:25:38"}},"upgrade_notice":{"1.4.2":"<ul>\n<li>Fixed issue with private\/draft posts being created as MD files and added checkbox to post edit pages to exclude posts from MD generation. Also fixes small issue in unusual taxonomy slugs prodducing incorrect URLs in Topics secion of MD body. Adds Strauss namespacing to html-to-markdown\/Composer includes to avoid collisions.<\/li>\n<\/ul>","1.4.1":"<p>Removes <code>llms.txt<\/code> index generation, including the <code>--with-llmstxt<\/code> WP-CLI flag. If you relied on this output, stay on 1.3.x or generate <code>llms.txt<\/code> externally.<\/p>","1.3.0":"<p>New optional frontmatter fields (hierarchy, author, relative image paths), a Topics body section, inline Markdown preview, and the prune-stats WP-CLI command. All features are opt-in via Settings. No breaking changes or database migrations required.<\/p>","1.2.0":"<p>Adds taxonomy archive support and AJAX bulk generation. No breaking changes. Taxonomy archive files will be generated on the next post save or via Settings \u2192 Generate All Taxonomy Archives.<\/p>","1.1.0":"<p>Per-post-type field configuration, ACF support, and manifest-based change tracking.<\/p>","1.0.0":"<p>Initial release.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3518653,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3518653,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3518653,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3518653,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.3.0","1.4.1","1.4.2"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Settings page with export options and bulk generation.","2":"Post meta box showing file status, regenerate button, and inline Markdown preview.","3":"WP-CLI status output."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[15643,2353,257149,226124,4608],"plugin_category":[],"plugin_contributors":[260804],"plugin_business_model":[],"class_list":["post-296119","plugin","type-plugin","status-publish","hentry","plugin_tags-agents","plugin_tags-ai","plugin_tags-content-negotiation","plugin_tags-llm","plugin_tags-markdown","plugin_contributors-chancerylaneproject","plugin_committers-chancerylaneproject","plugin_committers-dogwonder","plugin_committers-felixcohen"],"banners":{"banner":"https:\/\/ps.w.org\/markdown-for-agents-and-statistics\/assets\/banner-772x250.png?rev=3518653","banner_2x":"https:\/\/ps.w.org\/markdown-for-agents-and-statistics\/assets\/banner-1544x500.png?rev=3518653","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/markdown-for-agents-and-statistics\/assets\/icon-128x128.png?rev=3518653","icon_2x":"https:\/\/ps.w.org\/markdown-for-agents-and-statistics\/assets\/icon-256x256.png?rev=3518653","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Markdown for Agents and Statistics converts your WordPress content to Markdown and serves it\nto AI agents and language model tools that request it via HTTP content negotiation\n(<code>Accept: text\/markdown<\/code>).<\/p>\n\n<p>The Chancery Lane Project is a charity that helps organisations reduce emissions using the power of legal documents and processes. We've published this plugin as we believe that making content more legible for AI Agents makes a meaningful difference to their energy usage - not only by reducing the amount of tokens required (by up to 90% over HTML) to consume the content, but also minimising the server resources required to render, process and display pages at source.<\/p>\n\n<p><strong>How it works:<\/strong><\/p>\n\n<ol>\n<li>Posts and taxonomy archive pages are converted to Markdown and saved as static\nfiles on disk inside <code>wp-content\/uploads\/<\/code>.<\/li>\n<li>When a visitor (or AI agent) requests a page with <code>Accept: text\/markdown<\/code> in\nthe HTTP headers, WordPress serves the pre-generated <code>.md<\/code> file directly \u2014\nno page render required.<\/li>\n<li>A <code>&lt;link rel=\"alternate\" type=\"text\/markdown\"&gt;<\/code> tag is added to each page's\n    so agents can discover Markdown versions automatically.<\/li>\n<\/ol>\n\n<p><strong>Features:<\/strong><\/p>\n\n<ul>\n<li>Content negotiation (<code>Accept: text\/markdown<\/code>, <code>?output_format=md<\/code>, or known AI User-Agents)<\/li>\n<li><strong>Taxonomy archive support<\/strong> \u2014 category, tag, and custom taxonomy term pages served as Markdown post listings<\/li>\n<li>Automatic Markdown generation on post save; taxonomy archives auto-update when any post in the term changes<\/li>\n<li>AJAX bulk generation with live progress counter \u2014 no page timeouts on large sites<\/li>\n<li>Per-post-type field configuration \u2014 choose which meta\/ACF fields go in frontmatter or body<\/li>\n<li>ACF support with dot notation for nested group fields (e.g. <code>group.subfield<\/code>)<\/li>\n<li>Content fields option \u2014 use ACF fields as the body content instead of post_content<\/li>\n<li>Manifest generation with content hashes and change tracking per post type<\/li>\n<li>Incremental export \u2014 only re-export changed documents (<code>--incremental<\/code>)<\/li>\n<li>Delta file (<code>changes.json<\/code>) for RAG system sync<\/li>\n<li>Access statistics \u2014 logs AI agent requests with a dedicated stats admin page<\/li>\n<li><strong>Optional frontmatter fields<\/strong> \u2014 hierarchy (parent\/ancestors\/children IDs), author display name, root-relative featured image paths<\/li>\n<li><strong>Topics section<\/strong> \u2014 appends a <code>## Topics<\/code> section with linked taxonomy terms to the Markdown body<\/li>\n<li><strong>Export preview<\/strong> \u2014 preview generated Markdown inline in the post editor without writing to disk<\/li>\n<li>WP-CLI commands: <code>generate<\/code>, <code>generate-taxonomies<\/code>, <code>prune-stats<\/code>, <code>status<\/code>, <code>delete<\/code><\/li>\n<li>Fully unit-tested<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin to <code>\/wp-content\/plugins\/markdown-for-agents\/<\/code>, or install via the WordPress Plugins screen.<\/li>\n<li>Activate the plugin through the Plugins screen in WordPress.<\/li>\n<li>Visit <strong>Settings \u2192 Markdown for Agents<\/strong> and choose which post types and taxonomies to generate.<\/li>\n<li>Enable <strong>Auto-generate on save<\/strong> so files stay in sync as you publish or edit content (optional).<\/li>\n<li>Click <strong>Generate All<\/strong> to create Markdown for your existing content. On large sites you can also run <code>wp markdown-agents generate<\/code> and <code>wp markdown-agents generate-taxonomies<\/code> from WP-CLI.<\/li>\n<li>Verify by appending <code>?output_format=md<\/code> to any post URL (or using an AI User-Agent) to confirm Markdown is served.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"where%20are%20the%20markdown%20files%20stored%3F\"><h3>Where are the Markdown files stored?<\/h3><\/dt>\n<dd><p>Inside <code>wp-content\/uploads\/{export_dir}\/<\/code> (configurable in Settings). Post files\nlive under <code>{export_dir}\/{post-type}\/{slug}.md<\/code>. Taxonomy archive files live under\n    {export_dir}\/taxonomy\/{taxonomy}\/{term-slug}.md. The directory is served by\nWordPress when content negotiation is triggered.<\/p><\/dd>\n<dt id=\"will%20this%20slow%20down%20my%20site%3F\"><h3>Will this slow down my site?<\/h3><\/dt>\n<dd><p>No. Markdown files are generated ahead of time (on post save or via manual\/CLI\nbulk generation). Serving them is a simple file read, much faster than rendering\na full WordPress page.<\/p><\/dd>\n<dt id=\"what%20are%20taxonomy%20archive%20files%3F\"><h3>What are taxonomy archive files?<\/h3><\/dt>\n<dd><p>For every public taxonomy term (categories, tags, custom taxonomies) the plugin\ngenerates a Markdown file listing all published posts in that term with links and\nexcerpts. These are served automatically when an AI agent requests a taxonomy\narchive URL. This lets agents navigate your site structure by exploring term listings,\nnot just individual posts.<\/p><\/dd>\n<dt id=\"what%20is%20the%20manifest.json%20file%3F\"><h3>What is the manifest.json file?<\/h3><\/dt>\n<dd><p>When you generate with <code>--with-manifest<\/code> or <code>--incremental<\/code>, a <code>manifest.json<\/code> is\ncreated inside each post-type export folder (e.g. <code>wp-mfa-exports\/post\/manifest.json<\/code>).\nIt contains a registry of all exported documents with content hashes and change\ntracking (new\/modified\/unchanged\/deleted), enabling RAG systems to identify what\nchanged since the last export without reprocessing all documents.<\/p><\/dd>\n<dt id=\"how%20does%20incremental%20export%20work%3F\"><h3>How does incremental export work?<\/h3><\/dt>\n<dd><p>Use <code>wp markdown-agents generate --incremental<\/code> to only re-export documents that\nhave changed since the last export. The plugin compares content hashes against the\nprevious manifest.json and skips unchanged posts. This also generates a\n    changes.json delta file listing new, modified, and deleted documents \u2014 your RAG\nsystem can read this to know exactly what to re-embed.<\/p><\/dd>\n<dt id=\"how%20do%20i%20configure%20fields%20per%20post%20type%3F\"><h3>How do I configure fields per post type?<\/h3><\/dt>\n<dd><p>In <strong>Settings \u2192 Markdown for Agents<\/strong>, each enabled post type has its own\n\"Field Configuration\" section with two textareas:<\/p>\n\n<ul>\n<li><strong>Frontmatter fields<\/strong> \u2014 meta or ACF fields added to the YAML frontmatter.<\/li>\n<li><strong>Content fields<\/strong> \u2014 meta or ACF fields used as the body content. When set,\n  post_content is automatically excluded.<\/li>\n<\/ul>\n\n<p>Use dot notation for ACF group fields (e.g. <code>clause_fields.clause_summary<\/code>).\nPlain meta keys work too (e.g. <code>_yoast_wpseo_title<\/code>). ACF relationship fields\nare automatically converted to a list of post titles.<\/p><\/dd>\n<dt id=\"can%20i%20customise%20the%20markdown%20output%3F\"><h3>Can I customise the Markdown output?<\/h3><\/dt>\n<dd><p>Yes. Several filters are available:<\/p>\n\n<ul>\n<li><code>markdown_for_agents_pre_convert<\/code> \u2014 filter HTML before conversion<\/li>\n<li><code>markdown_for_agents_post_convert<\/code> \u2014 filter Markdown after conversion<\/li>\n<li><code>markdown_for_agents_frontmatter<\/code> \u2014 modify frontmatter fields for a post<\/li>\n<li><code>markdown_for_agents_taxonomy_frontmatter<\/code> \u2014 modify frontmatter fields for a taxonomy archive<\/li>\n<li><code>markdown_for_agents_serve_enabled<\/code> \u2014 enable\/disable serving for a specific post<\/li>\n<li><code>markdown_for_agents_serve_taxonomies<\/code> \u2014 enable\/disable serving for taxonomy archive pages<\/li>\n<li><code>markdown_for_agents_file_generated<\/code> \u2014 action fired after a file is written<\/li>\n<li><code>markdown_for_agents_file_deleted<\/code> \u2014 action fired after a file is deleted<\/li>\n<\/ul><\/dd>\n<dt id=\"how%20do%20i%20generate%20taxonomy%20archives%20via%20wp-cli%3F\"><h3>How do I generate taxonomy archives via WP-CLI?<\/h3><\/dt>\n<dd><p><code>wp markdown-agents generate-taxonomies\nwp markdown-agents generate-taxonomies --taxonomy=category\nwp markdown-agents generate-taxonomies --dry-run<\/code><\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.4.2<\/h4>\n\n<ul>\n<li>Fixed issue with private\/draft posts being created as MD files and added checkbox to post edit pages to exclude posts from MD generation. Also fixes small issue in unusual taxonomy slugs prodducing incorrect URLs in Topics secion of MD body. Adds Strauss namespacing to html-to-markdown\/Composer includes to avoid collisions.<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Removed <code>llms.txt<\/code> index generation. The <code>LlmsTxtGenerator<\/code> class, its <code>--with-llmstxt<\/code> WP-CLI flag on <code>wp markdown-agents generate<\/code>, and the corresponding unit tests have been dropped.<\/li>\n<\/ul>\n\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Add notices and copy around generating and regenerating content on install and updates to Settings<\/li>\n<li>Add transient to store and note when content needs regenerating<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Optional hierarchy frontmatter fields (<code>parent<\/code>, <code>ancestors<\/code>, <code>children<\/code> IDs) for hierarchical post types (pages, etc.).<\/li>\n<li>Optional author display name in frontmatter.<\/li>\n<li>Optional root-relative paths for featured images (survives domain migrations).<\/li>\n<li>Optional <code>## Topics<\/code> section appended to the Markdown body with linked taxonomy terms.<\/li>\n<li>Export preview \u2014 \"Preview Markdown\" button in the post meta box renders generated Markdown inline without writing to disk.<\/li>\n<li>New WP-CLI command: <code>wp markdown-agents prune-stats [--days=&lt;n&gt;] [--yes]<\/code> \u2014 removes access stats older than N days.<\/li>\n<li>Manifest hash now covers taxonomy term slugs \u2014 incremental export correctly detects posts whose terms changed.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Taxonomy archive support \u2014 generates Markdown index files for all public taxonomy terms (categories, tags, custom taxonomies), served via content negotiation.<\/li>\n<li>Taxonomy archives auto-regenerate when any post in the term is saved or deleted.<\/li>\n<li>AJAX bulk generation for taxonomy archives on the Settings page with live progress counter.<\/li>\n<li>New WP-CLI command: <code>wp markdown-agents generate-taxonomies [--taxonomy=&lt;slug&gt;] [--dry-run]<\/code>.<\/li>\n<li><code>&lt;link rel=\"alternate\" type=\"text\/markdown\"&gt;<\/code> tag now emitted on taxonomy archive pages.<\/li>\n<li>New filter: <code>markdown_for_agents_serve_taxonomies<\/code> to enable\/disable taxonomy archive serving globally.<\/li>\n<li>New filter: <code>markdown_for_agents_taxonomy_frontmatter<\/code> to modify taxonomy archive frontmatter before serialisation.<\/li>\n<li>Bulk generation buttons converted to AJAX with live counter \u2014 no more page timeouts on large sites.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Per-post-type field configuration for frontmatter and content fields.<\/li>\n<li>ACF support with dot notation for nested group fields.<\/li>\n<li>Content fields option \u2014 use ACF\/meta fields as body content instead of post_content.<\/li>\n<li>ACF relationship fields automatically normalised to post titles.<\/li>\n<li>Added manifest.json generation with content hashes and change tracking.<\/li>\n<li>New <code>--with-manifest<\/code> flag for <code>wp markdown-agents generate<\/code>.<\/li>\n<li>Manifest is generated per post-type folder for independent change tracking.<\/li>\n<li>Incremental export via <code>--incremental<\/code> \u2014 skips unchanged documents.<\/li>\n<li>Delta file (<code>changes.json<\/code>) generated for RAG system integration.<\/li>\n<li>Access statistics \u2014 logs AI agent requests; dedicated stats admin page.<\/li>\n<li>UA detection \u2014 configurable User-Agent strings force Markdown serving.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Serve pre-generated Markdown files to AI agents via HTTP content negotiation.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/296119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=296119"}],"author":[{"embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/chancerylaneproject"}],"wp:attachment":[{"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=296119"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=296119"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=296119"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=296119"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=296119"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=296119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}