{"id":320589,"date":"2026-06-12T06:43:48","date_gmt":"2026-06-12T06:43:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/better-llm-md-pages\/"},"modified":"2026-06-12T07:09:17","modified_gmt":"2026-06-12T07:09:17","slug":"berq-markdown","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/berq-markdown\/","author":23148973,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.0","stable_tag":"1.1.0","tested":"7.0","requires":"6.6","requires_php":"7.4","requires_plugins":null,"header_name":"Berq Markdown","header_author":"Hamza Mairaj","header_description":"Serve WordPress pages and posts as clean Markdown files optimized for AI\/LLM crawlers. Appending .md to any public URL returns structured Markdown with YAML frontmatter.","assets_banners_color":"","last_updated":"2026-06-12 07:09:17","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":38,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1.0":{"tag":"1.1.0","author":"berqwp","date":"2026-06-12 07:09:17"}},"upgrade_notice":{"1.0.0":"<p>Initial release. After activation, visit Settings &gt; Permalinks and click Save to flush rewrite rules.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3569664,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3569664,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpeg":{"filename":"screenshot-1.jpeg","revision":3569656,"resolution":"1","location":"assets","locale":"","width":2272,"height":1366}},"screenshots":{"1":"Settings page \u2014 General, Post Types, Exclusions, Cache, Headers, Advanced"}},"plugin_section":[],"plugin_tags":[2353,226124,4608,186,1557],"plugin_category":[55],"plugin_contributors":[232789,222160],"plugin_business_model":[],"class_list":["post-320589","plugin","type-plugin","status-publish","hentry","plugin_tags-ai","plugin_tags-llm","plugin_tags-markdown","plugin_tags-seo","plugin_tags-sitemap","plugin_category-seo-and-marketing","plugin_contributors-berqwp","plugin_contributors-thevisionofhamza","plugin_committers-berqwp"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/berq-markdown\/assets\/icon-128x128.png?rev=3569664","icon_2x":"https:\/\/ps.w.org\/berq-markdown\/assets\/icon-256x256.png?rev=3569664","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/berq-markdown\/assets\/screenshot-1.jpeg?rev=3569656","caption":"Settings page \u2014 General, Post Types, Exclusions, Cache, Headers, Advanced"}],"raw_content":"<!--section=description-->\n<p>Berq Markdown makes your WordPress content instantly consumable by AI assistants, LLM crawlers (GPTBot, ClaudeBot, Googlebot-AI), and Markdown-aware tools \u2014 without duplicating your content or creating separate pages.<\/p>\n\n<p>Appending <code>.md<\/code> to any public page or post URL (e.g. <code>https:\/\/example.com\/about.md<\/code>) returns a clean, structured Markdown file with YAML frontmatter. The plugin handles content from all common sources: Gutenberg blocks, classic editor, shortcodes, and custom PHP templates.<\/p>\n\n<p><strong>How it works<\/strong><\/p>\n\n<p>When a visitor or crawler requests <code>\/about.md<\/code>, the plugin intercepts the request, finds the matching WordPress post, converts the HTML content to Markdown, and serves it with the correct <code>Content-Type: text\/markdown<\/code> header \u2014 all without creating any new database entries or files.<\/p>\n\n<p><strong>Key Features<\/strong><\/p>\n\n<ul>\n<li><strong>Automatic .md URLs<\/strong> \u2014 any public post or page URL + <code>.md<\/code> returns clean Markdown<\/li>\n<li><strong>YAML frontmatter<\/strong> \u2014 every .md file includes <code>title<\/code>, <code>description<\/code>, <code>url<\/code>, <code>date_modified<\/code>, <code>author<\/code>, and <code>language<\/code><\/li>\n<li><strong>Full content compatibility<\/strong> \u2014 works with Gutenberg blocks, classic editor, shortcodes, and custom PHP page templates<\/li>\n<li><strong>HTML to Markdown conversion<\/strong> \u2014 pure PHP, no external dependencies; handles headings, paragraphs, lists, links, images, tables, code blocks, and more<\/li>\n<li><strong>Internal link rewriting<\/strong> \u2014 links to internal pages are rewritten to their <code>.md<\/code> equivalent automatically<\/li>\n<li><strong>URL exclusions with wildcards<\/strong> \u2014 exclude specific URL patterns using <code>*<\/code> as a wildcard (e.g. <code>\/cart\/*<\/code>, <code>*\/checkout*<\/code>)<\/li>\n<li><strong>Post type selection<\/strong> \u2014 choose which post types (posts, pages, custom post types) are served as Markdown<\/li>\n<li><strong>Transient caching<\/strong> \u2014 optional cache with configurable TTL to reduce server load at scale<\/li>\n<li><strong><code>&lt;link&gt;<\/code> tag injection<\/strong> \u2014 injects a <code>&lt;link rel=\"alternate\" type=\"text\/markdown\"&gt;<\/code> tag in every page's <code>&lt;head&gt;<\/code> so crawlers can discover the .md version<\/li>\n<li><strong><code>[btrmd313_md_link]<\/code> shortcode<\/strong> \u2014 renders a link to the current page's <code>.md<\/code> file, opens in a new tab<\/li>\n<li><strong>Multilingual support<\/strong> \u2014 detects language via Polylang or WPML, adds <code>language<\/code> and <code>alternates<\/code> to frontmatter and emits <code>hreflang<\/code> link tags<\/li>\n<li><strong>Public content rendering<\/strong> \u2014 always renders content as a non-logged-in visitor, so member-only sections are not exposed<\/li>\n<li><strong>Admin settings page<\/strong> \u2014 all options configurable under Settings &gt; Berq Markdown, with a Settings link on the Plugins page<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>berq-markdown<\/code> folder to <code>\/wp-content\/plugins\/<\/code><\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> menu in WordPress<\/li>\n<li>Go to <strong>Settings &gt; Permalinks<\/strong> and click <strong>Save Changes<\/strong> to flush rewrite rules (required once after activation)<\/li>\n<li>Visit any page URL with <code>.md<\/code> appended \u2014 e.g. <code>https:\/\/yoursite.com\/about.md<\/code><\/li>\n<li>Optionally configure the plugin under <strong>Settings &gt; Berq Markdown<\/strong><\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20create%20duplicate%20content%3F\"><h3>Does this create duplicate content?<\/h3><\/dt>\n<dd><p>No. The <code>.md<\/code> URLs are separate endpoints that return <code>Content-Type: text\/markdown<\/code> \u2014 search engines treat them differently from HTML pages. The plugin also sends <code>X-Robots-Tag: noindex, follow<\/code> by default to prevent indexing of the Markdown versions.<\/p><\/dd>\n<dt id=\"will%20it%20work%20with%20my%20page%20builder%3F\"><h3>Will it work with my page builder?<\/h3><\/dt>\n<dd><p>Yes. The plugin renders content the same way WordPress does for a logged-out visitor \u2014 using the full <code>the_content<\/code> filter chain, which includes Gutenberg blocks and most page builders. For pages using custom PHP templates with no <code>post_content<\/code>, it falls back to output-buffering the template and extracting the body content.<\/p><\/dd>\n<dt id=\"how%20do%20i%20exclude%20certain%20pages%20from%20.md%20serving%3F\"><h3>How do I exclude certain pages from .md serving?<\/h3><\/dt>\n<dd><p>Go to <strong>Settings &gt; Berq Markdown &gt; URL Exclusions<\/strong> and enter one URL pattern per line. Use <code>*<\/code> as a wildcard. Examples: <code>\/cart\/*<\/code>, <code>*\/checkout*<\/code>, <code>\/my-account\/<\/code>.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20yoast%20seo%3F\"><h3>Does it work with Yoast SEO?<\/h3><\/dt>\n<dd><p>Yes. When Yoast SEO is active, the plugin registers as a custom sitemap provider so your <code>.md<\/code> URLs appear in the Yoast sitemap index. It also reads Yoast's meta description for the frontmatter <code>description<\/code> field.<\/p><\/dd>\n<dt id=\"does%20it%20support%20custom%20post%20types%3F\"><h3>Does it support custom post types?<\/h3><\/dt>\n<dd><p>Yes. Go to <strong>Settings &gt; Berq Markdown &gt; Post Types<\/strong> and check any registered public post type you want to include.<\/p><\/dd>\n<dt id=\"is%20caching%20enabled%20by%20default%3F\"><h3>Is caching enabled by default?<\/h3><\/dt>\n<dd><p>No \u2014 caching is disabled by default so you always see fresh content during development. Enable it under <strong>Settings &gt; Berq Markdown &gt; Cache<\/strong> when you are ready to scale.<\/p><\/dd>\n<dt id=\"what%20shortcode%20is%20available%3F\"><h3>What shortcode is available?<\/h3><\/dt>\n<dd><p>[btrmd313_md_link] \u2014 outputs a link to the current page's <code>.md<\/code> version, opening in a new tab.<\/p>\n\n<p>Optional attributes:\n* <code>text<\/code> \u2014 link label (default: \"View as Markdown\")\n* <code>class<\/code> \u2014 additional CSS class(es)<\/p>\n\n<p>Example: <code>[btrmd313_md_link text=\"Read as Markdown\" class=\"my-button\"]<\/code><\/p><\/dd>\n<dt id=\"does%20it%20support%20multilingual%20sites%3F\"><h3>Does it support multilingual sites?<\/h3><\/dt>\n<dd><p>Yes. The plugin detects language via Polylang or WPML. It adds a <code>language<\/code> field to the frontmatter and an <code>alternates<\/code> block listing all translated <code>.md<\/code> URLs. It also emits <code>&lt;link rel=\"alternate\" hreflang=\"...\"&gt;<\/code> tags in the HTML <code>&lt;head&gt;<\/code>.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20caching%20plugins%3F\"><h3>Does it work with caching plugins?<\/h3><\/dt>\n<dd><p>Yes. The plugin serves <code>.md<\/code> files before WordPress loads any theme template. Cache plugins that operate at the HTTP level (e.g. full-page caching) may cache <code>.md<\/code> responses \u2014 this is fine and actually beneficial for performance.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Fix: MD files now served with correct 200 HTTP status (WordPress was setting 404 before template_redirect fired)<\/li>\n<li>Fix: Home page <code>.md<\/code> URL corrected \u2014 <code>\/index.md<\/code> instead of broken <code>site.local.md<\/code><\/li>\n<li>Fix: <code>url_to_postid()<\/code> trailing slash sensitivity \u2014 now tries URL both with and without trailing slash<\/li>\n<li>Fix: PHP template pages with empty <code>post_content<\/code> now rendered correctly via output buffer<\/li>\n<li>Fix: HTML comments (including Gutenberg block delimiters) stripped from Markdown output<\/li>\n<li>Fix: Heading whitespace normalized \u2014 multi-line headings collapse to a single line<\/li>\n<li>Fix: Inline tags inside headings stripped to plain text<\/li>\n<li>Fix: Description frontmatter field no longer wrapped in unnecessary quotes<\/li>\n<li>Fix: Cache disabled by default \u2014 opt-in instead of opt-out<\/li>\n<li>Fix: WordPress Plugin Check compliance \u2014 text domain corrected, <code>parse_url<\/code> \u2192 <code>wp_parse_url<\/code>, <code>strip_tags<\/code> \u2192 <code>wp_strip_all_tags<\/code>, variable prefixing in uninstall<\/li>\n<li>Feature: Post type selection \u2014 choose which post types are served as <code>.md<\/code> files<\/li>\n<li>Feature: Multilingual support \u2014 <code>language<\/code> and <code>alternates<\/code> frontmatter fields, <code>hreflang<\/code> link tags (Polylang and WPML)<\/li>\n<li>Feature: Internal links inside Markdown output rewritten to <code>.md<\/code> equivalents automatically<\/li>\n<li>Feature: <code>[btrmd313_md_link]<\/code> shortcode \u2014 renders a link to the current page's <code>.md<\/code> file<\/li>\n<li>Feature: Template pages rendered as non-logged-in visitor for accurate public content<\/li>\n<li>Feature: Admin bar suppressed during template output buffering<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<li>.md URL serving with YAML frontmatter<\/li>\n<li>HTML to Markdown conversion (pure PHP, DOMDocument)<\/li>\n<li>Gutenberg block, shortcode, and custom template support<\/li>\n<li>URL exclusions with wildcard support<\/li>\n<li>Post type selection<\/li>\n<li>Transient cache with configurable TTL<\/li>\n<li><code>&lt;link rel=\"alternate\"&gt;<\/code> injection in HTML head<\/li>\n<li><code>[btrmd313_md_link]<\/code> shortcode<\/li>\n<li>Yoast SEO sitemap integration + generic md-sitemap.xml fallback<\/li>\n<li>Multilingual support (Polylang, WPML) \u2014 language frontmatter + hreflang tags<\/li>\n<li>Internal link rewriting to .md equivalents<\/li>\n<li>Non-logged-in rendering for accurate public content<\/li>\n<li>Admin settings page under Settings &gt; Berq Markdown<\/li>\n<\/ul>","raw_excerpt":"Serve any WordPress page or post as a clean Markdown file optimized for AI and LLM crawlers by appending .md to the URL.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/320589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=320589"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/berqwp"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=320589"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=320589"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=320589"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=320589"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=320589"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=320589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}