About this plugin
txt with YAML frontmatter. No theme changes required.
txt, the plugin:
1. loads the page HTML,
2. extracts the primary content (default selector: main ),
3. converts HTML to Markdown,
4. prepends YAML frontmatter (metadata),
5. returns the result with short-term caching.
This keeps your normal site unchanged while exposing a clean Markdown output for tooling, archiving, and AI-friendly documentation workflows.
Key features include:
txt endpoint for pages, posts, and public custom post types
- YAML frontmatter headers for structured metadata (title, slug, canonical URL, generated time)
- HTML → Markdown conversion via League HTML to Markdown
- Builder-noise cleanup for common wrappers (Divi, Elementor, block markup)
- Configurable selector (default: main )
- Cached output to reduce repeated conversions
- Optional “Force Update” from the admin panel for refreshing the Markdown cache.
LLMs.txt / AI Documentation Workflows
txt index file that links to “detail” Markdown pages for fast AI ingestion and navigation.
This plugin can act as the “detail page generator” by making each page available as Markdown via a stable URL.
Typical pattern:
txt lists key pages (human curated)
txt URL for full content
)
Example Output
plugin: “MTM HTML to Markdown”
com/sample-page/”
generated_at: “2026-01-08T13:00:00-05:00”
slug: “sample-page”
Sample Page
(Body converted to Markdown…)
Troubleshooting
I get a 404 on.md.txt URLs
Confirm pretty permalinks are enabled, then re-save Settings → Permalinks to flush rewrite rules.
txt path.
Output is missing content
, #content).
Credits
Developed by Moving Traffic Media & YSC.
Uses League HTML to Markdown under MIT license.
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License v2 or later.
html.