Serve your WordPress content as clean Markdown for AI agents and crawlers.
For two decades, we built websites for two audiences: humans and search engines. AI agents are now the third audience, and most websites aren't optimized for them yet.
Inspired by Dries Buytaert's experiment.
- 📄 Markdown URL Endpoints — Append
.mdto any URL - 🤝 Content Negotiation — Automatic Markdown for
Accept: text/markdown - 🔍 Auto-Discovery —
<link rel="alternate">tags for AI crawlers - ⚙️ Configurable Metadata — Title, date, author, categories, tags, excerpt, featured image
- 📝 YAML Front Matter — Structured metadata
- 🎛️ Per Post Type Control — Enable/disable for specific post types
cd wp-content/plugins/
git clone https://github.com/jamesbrooksco/ai-friendly-markdown.gitOr download from WordPress.org and upload via Plugins > Add New.
Method 1: Append .md to URL
https://example.com/my-blog-post.md
Method 2: Content Negotiation
curl -H "Accept: text/markdown" https://example.com/my-blog-post/---
title: My Blog Post
date: 2024-01-15
author: James Brooks
categories:
- Technology
tags:
- AI
url: https://example.com/my-blog-post/
---
# My Blog Post
Content here...// Customize Markdown output
add_filter( 'aifm_markdown_output', function( $markdown, $post ) {
return $markdown . "\n\n---\n*Via AI Friendly Markdown*";
}, 10, 2 );
// Customize metadata
add_filter( 'aifm_post_metadata', function( $metadata, $post ) {
$metadata['custom_field'] = get_post_meta( $post->ID, 'custom', true );
return $metadata;
}, 10, 2 );- WordPress 5.0+
- PHP 7.4+
GPL v2 or later
- Inspired by Dries Buytaert's "The Third Audience"