Agents that ask for Markdown get your page's Markdown copy at the same address
TL;DR: Turn it on with one line in your _redirects file. A request for /cli/ that prefers text/markdown then gets your site's /cli.md copy, while browsers still get the HTML. Level 0 sites only.
More and more sites ship a Markdown copy of each page beside the HTML, for AI agents and other tools that read text better than markup. Until now an agent had to know your site’s naming convention to find that copy. Now it can ask for the page’s usual address and say it prefers Markdown, and the edge hands it the copy.
Add this line anywhere in your _redirects file:
# ee:markdown on
The line is a comment, so the same file still works unchanged elsewhere.
Who gets Markdown
A request gets the Markdown copy only when its Accept header ranks text/markdown above text/html. A tie goes to HTML, so browsers, and requests that accept */*, always get your HTML page as before.
Where the copy is looked for
/cli/→/cli.md, then/cli/index.md/→/index.md/about.htmland/about→/about.md
If a page has no Markdown copy, nothing changes for it.
How it behaves
- Your own rules come first. A path you redirect, or rewrite to another file, is left alone, so a single-page-app catch-all doesn’t hand out your home page’s copy for every route. Clean URLs still work.
- The copy is served as the file it is, with its own content type and the
_headersrules for the.mdpath, such as anoindexrule for/*.md. - It takes the page’s cache policy, so a new deploy shows at once.
- Both versions carry
Vary: Accept, and the HTML page also carriesLink: </cli.md>; rel="alternate"; type="text/markdown", so a tool reading the HTML can find the copy. Pages without a copy get neither header, and anyLinkorVaryrules of your own stay alongside ours. - A Markdown response counts as a normal request in your usage.
Limits
- Level 0 sites only, like everything in
_redirects. - There’s no CLI flag for it yet. Add the line to
_redirectsyourself.
What you need to do
Nothing, unless you want it. If your site already builds .md copies of its pages, add the line above to _redirects and deploy.