Daniel Doubrovkine (dB.)2 min readintermediate
Serving Markdown for AI Agents, Now as a Jekyll Plugin
Summary
The author turned a one‑off script that rendered each Jekyll page to Markdown and added a `<link rel="alternate" type="text/markdown">` tag into a reusable Jekyll plugin (jekyll‑md). The gem hooks into the build, extracts the main content (defaulting to `<main>` or `[role="main"]`), converts it to Markdown, injects the discovery link, and requires no per‑page front‑matter. Configuration is option…
- Package site‑wide Markdown rendering as a Jekyll plugin to avoid per‑page boilerplate.
- Leverage Jekyll generators and hooks to run after HTML rendering, keeping the workflow in the static‑site build.
- Default content extraction from `<main>` or `[role="main"]` works for most themes; a custom selector can be supplied.
- Avoid generating a monolithic llms.txt; instead curate a small file manually to stay within LLM context limits.
Providing clean Markdown lets LLM‑based agents consume content without HTML parsing, improving reliability and enabling downstream use‑cases (e.g., the author’s $360 referral conversion). Packaging the logic as a plugin simplifies maintenance, reduces duplication, and makes the technique reusable f…
6/10



