Skip to content

Negotiate text/markdown content type on homepage#51

Merged
mattt merged 2 commits intomainfrom
mattt/text-markdown
Mar 3, 2026
Merged

Negotiate text/markdown content type on homepage#51
mattt merged 2 commits intomainfrom
mattt/text-markdown

Conversation

@mattt
Copy link
Copy Markdown
Member

@mattt mattt commented Mar 3, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enables the Worker to handle / before static assets so the homepage can negotiate and return Markdown (llms.txt) when the client requests text/markdown via the Accept header.

Changes:

  • Configure Wrangler assets to run the Worker first for /.
  • Add a / route that serves public/llms.txt as text/markdown when requested; otherwise falls back to the static asset response.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
wrangler.jsonc Routes / through the Worker first so content negotiation can occur before asset serving.
src/index.ts Implements Accept: text/markdown negotiation on / by returning llms.txt as Markdown.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.ts Outdated
@mattt mattt merged commit 93e5d76 into main Mar 3, 2026
2 checks passed
@mattt mattt deleted the mattt/text-markdown branch March 3, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants