Skip to content

feat: serve raw markdown via content negotiation#2975

Closed
roidelapluie wants to merge 5 commits intoprometheus:mainfrom
roidelapluie:roidelapluie/serve-md
Closed

feat: serve raw markdown via content negotiation#2975
roidelapluie wants to merge 5 commits intoprometheus:mainfrom
roidelapluie:roidelapluie/serve-md

Conversation

@roidelapluie
Copy link
Copy Markdown
Member

Add a Netlify edge function that serves raw .md files when the client sends Accept: text/markdown or text/plain. A build-time script copies markdown sources into out/_md/docs/ for the edge function to proxy.

Apparently useful for agents.

Add a Netlify edge function that serves raw .md files when the client
sends Accept: text/markdown or text/plain. A build-time script copies
markdown sources into out/_md/docs/ for the edge function to proxy.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
@roidelapluie roidelapluie force-pushed the roidelapluie/serve-md branch from 132d442 to 5442551 Compare April 17, 2026 16:17
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
@roidelapluie roidelapluie requested a review from juliusv April 17, 2026 16:33
Copy link
Copy Markdown
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This lgtm.

Copy link
Copy Markdown
Member

@juliusv juliusv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks ok to me too. I want to call out two considerations that are probably ok, but at least we should be explicitly aware of them:

  • We are making the site deployment way more Netlify-dependent than before (it's no longer just serving static files).
  • I wonder what the performance hit will be to serve every request through an edge function rather than just serving a static file. Probably fine? Does Netlify's caching along with the Vary: Accept take care of it still?

@roidelapluie
Copy link
Copy Markdown
Member Author

We might be better of with a llms.txt.

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.

3 participants