SR Agent Markdown
Serves Markdown representations of public pages for AI agents via Accept header, .md URLs, or query parameters.
by SR Website · github.com/studiorepublic/sr-agent-markdown · website
★ 0stars
3release downloads
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/studiorepublic/sr-agent-markdown/releases/download/v1.0.3/sr-agent-markdown.zipFrom the readme
SR Agent Markdown
WordPress plugin that serves Markdown representations of public pages for AI agents.
Markdown is produced only from captured front-end HTML after theme and template rendering. The plugin does not read ACF fields, flexible content, or post meta directly for body content.
Requirements
- PHP 8.1+
- WordPress 6.5+
- Composer dependency: league/html-to-markdown
Installation
1. Copy this folder to wp-content/plugins/sr-agent-markdown/.
2. If vendor/ is missing, run:
For development and tests:
3. Activate SR Agent Markdown in wp-admin.
4. Visit Settings → Agent Markdown to configure detection, content selectors, safety rules, caching, and debug options.
On activation the plugin registers .md rewrite rules and flushes permalinks.
How it works
1. Request detection — Markdown is returned when any enabled method matches:
- Accept: text/markdown
- URL ending in .md (for example /about.md)
- ?format=markdown or ?output=markdown
2. Eligibility checks — Admin, REST, AJAX, feeds, sitemaps, robots, cron, auth, previews, password-protected posts, private drafts, and other excluded contexts are skipped.
3. Output buffering — Eligible Markdown requests render the
Read the full README on GitHub →