PHPackages                             serkanalgur/markdown-content-negotiator-for-llms - 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/markdown-content-negotiator-for-llms

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

serkanalgur/markdown-content-negotiator-for-llms
================================================

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

v1.1.0(2mo ago)20GPL-2.0-or-laterPHPPHP &gt;=7.3

Since Feb 20Pushed 2mo agoCompare

[ Source](https://github.com/serkanalgur/markdown-content-negotiator-for-llms)[ Packagist](https://packagist.org/packages/serkanalgur/markdown-content-negotiator-for-llms)[ RSS](/packages/serkanalgur-markdown-content-negotiator-for-llms/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (12)Used By (0)

[![WordPress](https://camo.githubusercontent.com/b88cd5e104ebad5d75c6551e49599d48f9c4c5274681ef404c6b38d8712b65af/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576f726450726573732d2532333231373539422e7376673f6c6f676f3d776f72647072657373266c6f676f436f6c6f723d7768697465)](https://wordpress.org/plugins/sa-ai-markdown/) [![Packagist Version](https://camo.githubusercontent.com/89462c36bd5ab4aae677ae672d8da5c8565387c251b2a2a4a3fc9c5226c11f58/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365726b616e616c6775722f6d61726b646f776e2d636f6e74656e742d6e65676f746961746f722d666f722d6c6c6d73)](https://packagist.org/packages/serkanalgur/markdown-content-negotiator-for-llms) [![WordPress Plugin Version](https://camo.githubusercontent.com/9e6e28052bee6d696232db16451864ff4a745a7247db5689114e5f8387e74018/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f762f73612d61692d6d61726b646f776e)](https://camo.githubusercontent.com/9e6e28052bee6d696232db16451864ff4a745a7247db5689114e5f8387e74018/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f762f73612d61692d6d61726b646f776e) [![WordPress Plugin Stars](https://camo.githubusercontent.com/ed366380307c04c2d5ffb5ae3afedf81350e7d15c66e78f80af61dfe7727270c/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f73746172732f73612d61692d6d61726b646f776e)](https://wordpress.org/plugins/sa-ai-markdown/#reviews) [![PHP](https://camo.githubusercontent.com/f9a99d454bc554bf36065ad4bced3ecd0f7aefed231b4735babd9d7d43f73713/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2532333737374242342e7376673f266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](#) [![GitHub Release](https://camo.githubusercontent.com/693fa0bf4263d8ac21ea665cd63523f29c338b25a6b4c0d67acd8e949825030b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7365726b616e616c6775722f6d61726b646f776e2d636f6e74656e742d6e65676f746961746f722d666f722d6c6c6d73)](https://github.com/serkanalgur/markdown-content-negotiator-for-llms/releases) [![WordPress Plugin Downloads](https://camo.githubusercontent.com/4251e4577a5846c7134014837edf832f947b83562b26eca1c5b219837d8411f3/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f64772f73612d61692d6d61726b646f776e)](https://camo.githubusercontent.com/4251e4577a5846c7134014837edf832f947b83562b26eca1c5b219837d8411f3/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f64772f73612d61692d6d61726b646f776e)

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

Markdown Content Negotiator for LLMs
------------------------------------

[](#markdown-content-negotiator-for-llms)

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

[](#110)

- Added WooCommerce Product support.
- Added Elementor content rendering support.
- Improved WooCommerce product data extraction (dimensions, weight, price with currency).
- Moved product templates to internal code-based generation.
- Fixed Markdown output escaping issues.

### 1.0.9

[](#109)

- Support for WooCommerce Products.
- Added product-specific Markdown templates.
- Better metadata extraction for e-commerce sites.

### 1.0.8

[](#108)

- Misspelling fix

### 1.0.7

[](#107)

- Refactor avoid trademark of 'WP'

### 1.0.5

[](#105)

- Name Change &amp; Refactor plugin

### 1.0.4

[](#104)

- Security: Implemented Late Escaping for all echoed variables and generated data.
- Security: Added nonces and strict data sanitization for admin settings.
- Standards: Full compliance with WordPress PHP Coding Standards (WPCS).
- Refactor: Added complete Docblock documentation and standardized all hook callbacks.

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

34

—

LowBetter than 77% of packages

Maintenance86

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

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

11

Last Release

67d 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 (28 commits)")

---

Tags

markdownphppluginwordpresswordpress-plugin

### Embed Badge

![Health badge](/badges/serkanalgur-markdown-content-negotiator-for-llms/health.svg)

```
[![Health](https://phpackages.com/badges/serkanalgur-markdown-content-negotiator-for-llms/health.svg)](https://phpackages.com/packages/serkanalgur-markdown-content-negotiator-for-llms)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[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)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

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

PHPackages © 2026

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