PHPackages                             serkanalgur/sa-ai-markdown - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. serkanalgur/sa-ai-markdown

ActiveWordpress-plugin[Parsing &amp; Serialization](/categories/parsing)

serkanalgur/sa-ai-markdown
==========================

Detects Accept: text/markdown and serves pre-generated Markdown versions of posts/pages for AI agents.

v1.0.3(2mo ago)12↓100%GPL-2.0-or-laterPHPPHP &gt;=7.3

Since Feb 20Pushed 2mo agoCompare

[ Source](https://github.com/serkanalgur/sa-ai-markdown)[ Packagist](https://packagist.org/packages/serkanalgur/sa-ai-markdown)[ RSS](/packages/serkanalgur-sa-ai-markdown/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

[![WordPress](https://camo.githubusercontent.com/b88cd5e104ebad5d75c6551e49599d48f9c4c5274681ef404c6b38d8712b65af/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576f726450726573732d2532333231373539422e7376673f6c6f676f3d776f72647072657373266c6f676f436f6c6f723d7768697465)](#) [![Packagist Version](https://camo.githubusercontent.com/574625cdfbffe6d347020033dd938a148678decdd41d655c0187ab0d174eb5d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365726b616e616c6775722f73612d61692d6d61726b646f776e)](https://camo.githubusercontent.com/574625cdfbffe6d347020033dd938a148678decdd41d655c0187ab0d174eb5d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365726b616e616c6775722f73612d61692d6d61726b646f776e) [![PHP](https://camo.githubusercontent.com/f9a99d454bc554bf36065ad4bced3ecd0f7aefed231b4735babd9d7d43f73713/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2532333737374242342e7376673f266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](#) [![GitHub Release](https://camo.githubusercontent.com/60f7f6f0ff193bb630ec1bd6ac9f78a97791a3f5ce1c56b34f09c8bbfd83b78c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7365726b616e616c6775722f73612d61692d6d61726b646f776e)](https://camo.githubusercontent.com/60f7f6f0ff193bb630ec1bd6ac9f78a97791a3f5ce1c56b34f09c8bbfd83b78c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7365726b616e616c6775722f73612d61692d6d61726b646f776e) [![GitHub License](https://camo.githubusercontent.com/3b4583cac7720f26642637b273ef17163ef8179dc3eb5fd6a577bd2eca290194/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7365726b616e616c6775722f73612d61692d6d61726b646f776e)](https://camo.githubusercontent.com/3b4583cac7720f26642637b273ef17163ef8179dc3eb5fd6a577bd2eca290194/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7365726b616e616c6775722f73612d61692d6d61726b646f776e)

[![Logo](assets/icon-256.png)](assets/icon-256.png)

AI Markdown Content Negotiator
------------------------------

[](#ai-markdown-content-negotiator)

A WordPress plugin that detects when a request is made for content in Markdown format (via the `Accept: text/markdown` header) and serves a clean, pre-generated Markdown version of the page instead of HTML.

🚀 Features
----------

[](#-features)

- **Content Negotiation**: Detects `Accept: text/markdown` and bypasses the standard theme template.
- **YAML Frontmatter**: Automatically prepends metadata (Title, Date, Author, Categories, Permalink).
- **Automated Caching**: Uses WP-Cron to pre-generate Markdown for all published posts and pages to minimize response time.
- **LLM-Friendly Headers**:
    - `X-Markdown-Tokens`: Estimates token count using standard heuristics.
    - `X-Content-Signal`: Provides document metadata (type, depth, priority) and custom signals.
- **Customizable**: Admin settings page to select Post Types and configure global content signals.

📥 Installation
--------------

[](#-installation)

1. Clone or download this repository.
2. Upload the folder to your `wp-content/plugins/` directory.
3. Activate the plugin in the WordPress Admin.
4. Go to **Settings &gt; AI Markdown** to configure your settings.

🛠 Usage
-------

[](#-usage)

To request the Markdown version of a post, include the appropriate header in your HTTP request:

```
curl -H "Accept: text/markdown" https://yourdomain.com/your-post/
```

### Response Example

[](#response-example)

```
---
title: "Hello World"
date: "2026-02-20 12:00:00"
author: "Serkan Algur"
permalink: "https://yourdomain.com/hello-world/"
categories: ["Uncategorized"]
---

# Hello World

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!
```

⚙️ Configuration
----------------

[](#️-configuration)

Available under **Settings &gt; AI Markdown**:

- **Enabled Post Types**: Select which post types (post, page, etc.) should be available in Markdown.
- **X-Content-Signal Extra**: Add custom global signals like `ai-train=yes, search=yes`.
- **Manual Regeneration**: Trigger a full cache refresh for all posts.

Screenshot
----------

[](#screenshot)

[![Settings Page Screenshot](screenshot.png)](screenshot.png)

Changelog
---------

[](#changelog)

### 1.0.3

[](#103)

- Ability to generate markdown when post changes.

### 1.0.2

[](#102)

- Featured Image support
- Description creation

### 1.0.1

[](#101)

- Code Block Conversion Support (pre and code)

### 1.0.0

[](#100)

- Inital Release

📝 License
---------

[](#-license)

GPL-2.0+

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance83

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

4

Last Release

85d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c0bdaace73a06876c30b91f86f99e206c4a8fe5bb7a1a1e91f159a5e2c98088?d=identicon)[serkanalgur](/maintainers/serkanalgur)

---

Top Contributors

[![serkanalgur](https://avatars.githubusercontent.com/u/353690?v=4)](https://github.com/serkanalgur "serkanalgur (11 commits)")

---

Tags

markdownphppluginwordpresswordpress-plugin

### Embed Badge

![Health badge](/badges/serkanalgur-sa-ai-markdown/health.svg)

```
[![Health](https://phpackages.com/badges/serkanalgur-sa-ai-markdown/health.svg)](https://phpackages.com/packages/serkanalgur-sa-ai-markdown)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
