For the Bots
Provides markdown versions of posts and pages via .md URLs. Fork of Markdown Alternate by Joost de Valk.
by Matt Cromwell · github.com/mathetos/for-the-bots · website
★ 0stars
1release downloads
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/mathetos/for-the-bots/releases/download/1.0.0/for-the-bots-1.0.0.zipReadme
For the Bots
A WordPress plugin that provides markdown versions of posts and pages for LLMs and users who prefer clean, structured content over HTML.
Fork of Markdown Alternate by Joost de Valk.
Why For the Bots?
This fork improves on the original Markdown Alternate with better performance, stability, and security.
- Performance & caching — Rendered markdown is cached using the WordPress object cache and transients. A singleton converter avoids redundant HTML-to-markdown work. Configurable via
for_the_bots_cache_ttl,for_the_bots_dual_cache_write, andfor_the_bots_use_cachefilters. Password-protected posts are never cached. - Stability — HTML-to-Markdown conversion is wrapped in try/catch with a
wp_strip_all_tagsfallback. Use thefor_the_bots_conversion_error_fallbackfilter to customize fallback output. Hierarchical pages useget_page_by_path()with afor_the_bots_resolve_post_by_pathfilter whenurl_to_postidfails. Accept-header handling is limited to singular content to avoid 404s on feeds and archives. - Security — Uses
wp_safe_redirectinstead ofwp_redirect, andesc_url_rawfor safer URL handling. Path validation helps prevent edge-case redirect issues. - Extensibility — Support for custom post types and post resolution via filters, plus cache context and conversion-fallback hooks for advanced control.
Features
- Access any post at
/post-slug.md - Access any page at
/page-slug.md - Nested pages work:
/parent/child.md - Date-based permalinks supported:
/2024/01/my-post.md - Content negotiation: Use
Accept: text/markdownheader on any post/page URL - Zero configuration required
Installation
For Users
- Download the plugin ZIP file
- Upload to
/wp-content/plugins/for-the-bots/ - Activate the plugin through the 'Plugins' screen in WordPress
- Visit any post or page URL with
.mdextension
For Developers
git clone https://github.com/mathetos/for-the-bots.git
cd for-the-bots
composer install
Usage
Append .md to any post or page URL, or use ?format=markdown. See the original Markdown Alternate README for full documentation.
Custom Post Type Support
add_filter('for_the_bots_supported_post_types', function($types) {
$types[] = 'book';
return $types;
});
License
GPL-2.0-or-later
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| 1.0.0 | Feb 16, 2026 | for-the-bots-1.0.0.zip | 1 |