{"id":274262,"date":"2026-01-16T16:36:58","date_gmt":"2026-01-16T16:36:58","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/mtm-html-to-markdown\/"},"modified":"2026-01-16T16:36:41","modified_gmt":"2026-01-16T16:36:41","slug":"mtm-html-to-markdown","status":"publish","type":"plugin","link":"https:\/\/yor.wordpress.org\/plugins\/mtm-html-to-markdown\/","author":23402740,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"1.0.0","tested":"6.9.4","requires":"5.0","requires_php":"7.4","requires_plugins":null,"header_name":"MTM HTML to Markdown","header_author":"MTM, YSC","header_description":"Dynamically generates a Markdown version of any page at a `.md.txt` URL with caching and YAML headers.","assets_banners_color":"6333d0","last_updated":"2026-01-16 16:36:41","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/movingtrafficmedia.com\/","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/mtm-html-to-markdown\/","header_author_uri":"https:\/\/www.movingtrafficmedia.com\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":156,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"mtmplugins","date":"2026-01-16 16:36:41"}},"upgrade_notice":{"1.0.0":"<p>Initial release. No upgrades yet.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3441140,"resolution":"128x128","location":"assets","locale":""}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3441140,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3441140,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3441140,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Settings screen showing selector configuration","2":"Example Markdown output with YAML frontmatter"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[144,1859,246,4608,253474],"plugin_category":[52,59],"plugin_contributors":[253475],"plugin_business_model":[],"class_list":["post-274262","plugin","type-plugin","status-publish","hentry","plugin_tags-caching","plugin_tags-export","plugin_tags-html","plugin_tags-markdown","plugin_tags-mtm","plugin_category-performance","plugin_category-utilities-and-tools","plugin_contributors-mtmplugins","plugin_committers-mtmplugins"],"banners":{"banner":"https:\/\/ps.w.org\/mtm-html-to-markdown\/assets\/banner-772x250.png?rev=3441140","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/mtm-html-to-markdown\/assets\/icon-128x128.png?rev=3441140","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/mtm-html-to-markdown\/assets\/screenshot-1.png?rev=3441140","caption":"Settings screen showing selector configuration"},{"src":"https:\/\/ps.w.org\/mtm-html-to-markdown\/assets\/screenshot-2.png?rev=3441140","caption":"Example Markdown output with YAML frontmatter"}],"raw_content":"<!--section=description-->\n<p>Serve cached Markdown versions of WordPress URLs at .md.txt with YAML frontmatter. No theme changes required.<\/p>\n\n<p>When a visitor requests a URL ending in <code>.md.txt<\/code>, the plugin:\n1. loads the page HTML,\n2. extracts the primary content (default selector: <code>main<\/code>),\n3. converts HTML to Markdown,\n4. prepends YAML frontmatter (metadata),\n5. returns the result with short-term caching.<\/p>\n\n<p>This keeps your normal site unchanged while exposing a clean Markdown output for tooling, archiving, and AI-friendly documentation workflows.<\/p>\n\n<p>Key features include:<\/p>\n\n<ul>\n<li><code>.md.txt<\/code> endpoint for pages, posts, and public custom post types<\/li>\n<li>YAML frontmatter headers for structured metadata (title, slug, canonical URL, generated time)<\/li>\n<li>HTML \u2192 Markdown conversion via League HTML to Markdown<\/li>\n<li>Builder-noise cleanup for common wrappers (Divi, Elementor, block markup)<\/li>\n<li>Configurable selector (default: <code>main<\/code>)<\/li>\n<li>Cached output to reduce repeated conversions<\/li>\n<li>Optional \"Force Update\" from the admin panel for refreshing the Markdown cache.<\/li>\n<\/ul>\n\n<h4>LLMs.txt \/ AI Documentation Workflows<\/h4>\n\n<p>Many teams maintain a <code>\/llms.txt<\/code> index file that links to \u201cdetail\u201d Markdown pages for fast AI ingestion and navigation.\nThis plugin can act as the \u201cdetail page generator\u201d by making each page available as Markdown via a stable URL.<\/p>\n\n<p>Typical pattern:\n- <code>\/llms.txt<\/code> lists key pages (human curated)\n- each entry links to the corresponding <code>.md.txt<\/code> URL for full content<\/p>\n\n<p>(If you publish <code>\/llms.txt<\/code>, confirm it only includes URLs you intend to expose publicly.)<\/p>\n\n<h4>Example Output<\/h4>\n\n\n\n<p>plugin: \"MTM HTML to Markdown\"\nsource_url: \"https:\/\/example.com\/sample-page\/\"\ngenerated_at: \"2026-01-08T13:00:00-05:00\"<\/p>\n\nslug: \"sample-page\"\n\nSample Page\n\n<p>(Body converted to Markdown\u2026)<\/p>\n\n<h3>Troubleshooting<\/h3>\n\n<h4>I get a 404 on .md.txt URLs<\/h4>\n\n<p>Confirm pretty permalinks are enabled, then re-save Settings \u2192 Permalinks to flush rewrite rules.\nIf a caching layer\/CDN is in front of the site, purge cache for the <code>.md.txt<\/code> path.<\/p>\n\n<h4>Output is missing content<\/h4>\n\n<p>If your theme does not use a  element, change the selector to match the real content container (e.g., #content).<\/p>\n\n<h3>Credits<\/h3>\n\n<p>Developed by Moving Traffic Media &amp; YSC.<br \/>\nUses <a href=\"https:\/\/github.com\/thephpleague\/html-to-markdown\">League HTML to Markdown<\/a> under MIT license.<\/p>\n\n<h3>License<\/h3>\n\n<p>This program is free software: you can redistribute it and\/or modify it under the terms of the <strong>GNU General Public License v2 or later<\/strong>.<br \/>\nSee the full license at <a href=\"https:\/\/www.gnu.org\/licenses\/gpl-2.0.html\">https:\/\/www.gnu.org\/licenses\/gpl-2.0.html<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate via the WordPress Plugins screen.<\/li>\n<li>Visit Settings \u2192 MTM HTML to Markdown to adjust the content selector (default: <code>main<\/code>).<\/li>\n<li>Ensure \u201cpretty permalinks\u201d are enabled (Settings \u2192 Permalinks).<\/li>\n<li>Append <code>.md.txt<\/code> to any public URL: https:\/\/example.com\/sample-page.md.txt<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20generate%20the%20markdown%20version%20of%20a%20page%3F\"><h3>How do I generate the Markdown version of a page?<\/h3><\/dt>\n<dd><p>Simply append <code>.md.txt<\/code> to the end of any page, post, or custom post type URL.<br \/>\nExample: <code>https:\/\/example.com\/sample-page.md.txt<\/code><\/p><\/dd>\n<dt id=\"how%20do%20i%20generate%20the%20markdown%20version%20of%20the%20homepage%3F\"><h3>How do I generate the Markdown version of the homepage?<\/h3><\/dt>\n<dd><p>For the homepage, you need to use the <code>home<\/code> slug in the URL.<br \/>\nExample: <code>https:\/\/example.com\/home.md.txt<\/code><br \/>\nAccessing <code>https:\/\/example.com\/.md.txt<\/code> or <code>https:\/\/example.com\/index.md.txt<\/code> will not work unless configured otherwise.<\/p><\/dd>\n<dt id=\"can%20i%20select%20a%20specific%20part%20of%20the%20page%20for%20conversion%3F\"><h3>Can I select a specific part of the page for conversion?<\/h3><\/dt>\n<dd><p>Yes. Go to <strong>Settings \u2192 MTM HTML to Markdown<\/strong> and enter the HTML tag or ID you want to extract (default: <code>main<\/code>).<\/p><\/dd>\n<dt id=\"does%20this%20plugin%20work%20with%20page%20builders%20like%20divi%20or%20elementor%3F\"><h3>Does this plugin work with page builders like Divi or Elementor?<\/h3><\/dt>\n<dd><p>In most cases, yes. The conversion uses the rendered HTML output and includes cleanup to reduce common wrapper noise.\nHighly dynamic or JS-rendered fragments may not appear in server-generated HTML.<\/p><\/dd>\n<dt id=\"how%20long%20is%20the%20markdown%20cached%3F\"><h3>How long is the Markdown cached?<\/h3><\/dt>\n<dd><p>By default, converted Markdown is cached for <strong>15 minutes<\/strong>.<\/p>\n\n<p>To force a refresh of the Markdown cache for a page, append the following parameters to the <code>.md.txt<\/code> URL: ?force_update=1&amp;mtm_md_nonce=<\/p>\n\n<p>For example: https:\/\/example.com\/sample-page.md.txt?force_update=1&amp;mtm_md_nonce=<\/p>\n\n<p>If you are unsure about the nonce, you can use the <strong>\"Force Update Markdown\" button<\/strong> in the plugin settings page. Enter the page slug, and it will open the correct URL in a new tab with the nonce automatically included.<\/p><\/dd>\n<dt id=\"does%20this%20change%20my%20site%E2%80%99s%20normal%20pages%20or%20seo%3F\"><h3>Does this change my site\u2019s normal pages or SEO?<\/h3><\/dt>\n<dd><p>Normal URLs remain unchanged. Markdown is only served when <code>.md.txt<\/code> is requested.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20track%20users%20or%20send%20data%20to%20external%20services%3F\"><h3>Does the plugin track users or send data to external services?<\/h3><\/dt>\n<dd><p>No. The plugin does not send page content or visitor data to external servers.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First public release<\/li>\n<li>Converts pages, posts, and custom post types to Markdown<\/li>\n<li>Handles page builder HTML cleanup<\/li>\n<li>Adds YAML headers with plugin info, URL, slug, and generation date<\/li>\n<li>Short-term caching and optional force refresh<\/li>\n<li>Settings page to configure HTML selector<\/li>\n<li>Added Force Update option via admin button or URL with nonce<\/li>\n<\/ul>","raw_excerpt":"Converts any WordPress page or post to Markdown at a .md.txt URL with caching and YAML headers.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/274262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=274262"}],"author":[{"embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mtmplugins"}],"wp:attachment":[{"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=274262"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=274262"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=274262"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=274262"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=274262"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=274262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}