
Serve Markdown and llms.txt from Hugo So AI Agents Can Read Your Posts
More of my reading now goes through a coding agent. I ask it to fetch a page, and it works from whatever it gets back. For a blog that’s a problem. A typical post is 22 to 50 KB of HTML, wrapped around 5 to 17 KB of content. The agent has to pull the content out of the wrapper first. So I made every post on this site available as plain Markdown at the same URL with index.md on the end, and added an llms.txt that lists them. Both are Hugo output formats, about twenty lines in total. This post has the config, both templates, the sizes I measured on the live site and the things that bit me. ...