Repository navigation
Conversation
- Object cache the HTML → Markdown conversion (wp_cache_get / wp_cache_set keyed on a content hash) so sites with a persistent object cache skip block rendering, shortcode expansion, and the league/html-to-markdown conversion on repeat hits. - Advertise the .md alternate on HTML responses via an RFC 8288 Link header and a <link rel="alternate" type="text/markdown"> tag in <head>, so RFC-8288-aware crawlers and HTML-parsing clients can discover the Markdown representation without sending Accept: text/markdown. - Emit X-Markdown-Source: accept | md-url | query on every Markdown response so operators can see the negotiation mix in access logs. - Add post_content_to_markdown/cache_md_urls filter (default false) so sites running a page cache that passes non-HTML bodies through untouched can opt .md URLs back into caching. Bump to 1.7.0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
contentToMarkdown()now wraps the block-rendering + shortcode + HTML→Markdown pipeline withwp_cache_get/wp_cache_setkeyed on a content hash. Sites with Redis/Memcached avoid re-running the conversion on repeat hits; no invalidation concern since a content change produces a new hash..mdalternate on HTML responses. EmitLink: <…>; rel="alternate"; type="text/markdown"as an HTTP header and<link rel="alternate" type="text/markdown" href="…">inside<head>. RFC 8288-aware crawlers and HTML-parsing clients can now discover the Markdown representation without sendingAccept: text/markdown.X-Markdown-Sourceresponse header. Every Markdown response now carriesX-Markdown-Source: accept | md-url | queryso operators can see the negotiation mix in access logs without reading bodies.post_content_to_markdown/cache_md_urlsfilter..mdURLs are distinct cache keys and in principle safely cacheable by WP page caches, but Super Cache / Batcache / etc. can transform response bodies assuming HTML (gzip, footer injection). Default staysfalse; sites whose page cache passes non-HTML bodies through untouched can opt in.<link>in<head>, theLink:HTTP header, and the threeX-Markdown-Sourcevalues.Bumps to 1.7.0.
🤖 Generated with Claude Code