WP Manifestindependent plugin directory
manifest / ai / ai-friendly-markdown

AI Friendly Markdown

WordPress plugin that serves your content as clean Markdown for AI agents and crawlers. Auto-discovery, content negotiation, and .md URL endpoints.

by James Brooks · github.com/jamesbrooksco/ai-friendly-markdown · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/jamesbrooksco/ai-friendly-markdown/archive/refs/heads/main.zip

Serve your WordPress content as clean Markdown for AI agents and crawlers.

The Third Audience

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.

Features

  • 📄 Markdown URL Endpoints — Append .md to 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

Installation

cd wp-content/plugins/
git clone https://github.com/jamesbrooksco/ai-friendly-markdown.git

Or download from WordPress.org and upload via Plugins > Add New.

Usage

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/

Example Output

---
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...

Hooks & Filters

// 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 );

Requirements

  • WordPress 5.0+
  • PHP 7.4+

License

GPL v2 or later

Credits