Skip to content

Add Markdown export for blog posts to serve AI agents#15

Open
mattarderne wants to merge 2 commits intomasterfrom
claude/update-blog-third-audience-V8OZz
Open

Add Markdown export for blog posts to serve AI agents#15
mattarderne wants to merge 2 commits intomasterfrom
claude/update-blog-third-audience-V8OZz

Conversation

@mattarderne
Copy link
Copy Markdown
Owner

Summary

This PR adds support for serving blog posts as clean Markdown to AI agents and crawlers, inspired by Dries Buytaert's concept of "the third audience." This improves the experience for AI tools that consume web content by eliminating HTML noise and providing structured, parseable input.

Changes

  • Jekyll plugin (_plugins/markdown_pages.rb): New generator that creates .md versions of all blog posts at build time, with an option to exclude specific posts via front matter
  • HTML head link (_layouts/postside.html): Added rel="alternate" link tag with type="text/markdown" to signal the availability of Markdown versions to crawlers
  • Documentation (writing/rdrn/_posts/2025-12-31-ai-agents.md): Added "The Third Audience" section explaining the motivation, implementation, and implications of this approach

Implementation Details

  • The plugin generates Markdown pages by extracting the raw post content and stripping layout/metadata
  • Posts can be excluded from Markdown export by adding exclude: true to front matter
  • Markdown files are accessible at the post slug with .md extension (e.g., /post-slug.md)
  • The alternate link in the HTML head helps AI crawlers discover the Markdown version
  • Low priority generator ensures it runs after other Jekyll processing

Rationale

AI agents struggle with parsing messy HTML containing navigation, sidebars, and other wrapper elements. Serving clean Markdown reduces token waste in LLM context windows and improves tool accuracy. This is a low-effort experiment to see if cleaner inputs lead to better attribution and more accurate AI-generated responses.

https://claude.ai/code/session_01U3YTcmTDVmjAQMEq2HjXMN

Reference Dries Buytaert's concept about AI agents being the third
audience for web content, connecting it to the agent tool-building
work discussed in the post.
- Add Jekyll plugin to generate .md versions of each blog post
- Add <link rel="alternate" type="text/markdown"> hint in HTML head
- Update blog post to document the implementation

Inspired by https://dri.es/the-third-audience
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants