Markdown feeds experiment - #855
Conversation
… our own namespace to avoid conflicts and document how to update in the future
…er markdown at the right times
…Ensure our Vary header doesn't overwrite any other heads that are set
…eaders. Don't add discovery link to password protected posts or non-public posts
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #855 +/- ##
=============================================
- Coverage 76.68% 76.33% -0.36%
- Complexity 2201 2537 +336
=============================================
Files 100 118 +18
Lines 9080 10005 +925
=============================================
+ Hits 6963 7637 +674
- Misses 2117 2368 +251
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What?
Closes #845
Adds a new experiment, Markdown Feeds, that when enabled introduces new markdown feeds for singular content and main archive feeds.
Why?
Having the ability to return content in markdown is useful for many situations, particularly for AI agents and machine readers.
How?
Markdown_Feedsexperiment class that registers needed hooksMarkdown_Singular_RendererandMarkdown_Feed_Renderer, that will render markdown for singular feeds and normal feedsMarkdown_Converterclass that provides a wrapper for converting HTML to Markdownincludes/Vendordirectory (alongside our encryption package) instead of including this at build time via composer. Ensure the file names match our autoloading process and add custom namespaces to avoid conflicts with other plugins using the same toolAccept: text/markdown<head>tag as wellwpai_markdown_singular_sectionsandwpai_markdown_feed_item_sectionsTo access a normal markdown feed, take the feed URL and append
/markdownor?feed=markdown, depending on if pretty permalinks are in use. Examples:https://example.com/feed/markdown,https://example.com/category/news/feed/markdownTo access a singular markdown feed, access the URL and append
?format=md, example:https://example.com/this-is-an-article?format=md.Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Fable 5, Opus 4.8
Used for: Putting together a plan and executing on that plan. Plan reviewed and modified by me and all code was reviewed and tested by me
Testing Instructions
Settings > AIand enable Markdown Feeds/feed/markdown?format=mdlinktag pointing to the markdown feedScreenshots or screencast
Changelog Entry