Skip to content

Add Content-Signal and markdown content negotiation - #201

Draft
injoon5 wants to merge 1 commit into
mainfrom
cursor/content-signals-markdown-negotiation-2bd4
Draft

Add Content-Signal and markdown content negotiation#201
injoon5 wants to merge 1 commit into
mainfrom
cursor/content-signals-markdown-negotiation-2bd4

Conversation

@injoon5

@injoon5 injoon5 commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Declares AI content-use preferences and serves markdown to agents that ask for it.

Content Signals

static/robots.txt now includes:

Content-Signal: ai-train=no, search=yes, ai-input=yes

Search indexing stays on. Model training is opted out. ai-input=yes matches the new markdown-for-agents path — agents may ground on the page.

The same value is sent as a Content-Signal header on markdown responses.

Markdown negotiation

Requests with Accept: text/markdown (preferred over text/html) get a markdown document instead of HTML:

  • Content-Type: text/markdown; charset=utf-8
  • Vary: Accept
  • x-markdown-tokens (4 chars/token estimate)
  • Blog/project pages use the source markdown (Korean by default, ?lang=en / cookie for English)
  • Home, listings, /now, and /health are generated from metadata, not scraped HTML
  • Browsers keep getting HTML

SSR routes are handled in hooks.server.js. Prerendered pages never hit that hook on Vercel, so vercel.json rewrites Accept: text/markdown to /api/markdown?path=….

Tests

Unit coverage for Accept parsing, robots.txt lockstep with the shared constant, listing/article helpers, and the /api/markdown handler.

Open in Web Open in Cursor 

Declare ai-train/search/ai-input preferences in robots.txt, and serve
text/markdown (with x-markdown-tokens) when agents send Accept:
text/markdown. Prerendered routes are rewritten to /api/markdown on Vercel
so static HTML is not served in that case.

Co-authored-by: Injoon Oh <injoon5@icloud.com>
@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview Aug 15, 2026 1:56pm

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying web with  Cloudflare Pages  Cloudflare Pages

Latest commit: e033ef4
Status:🚫  Build failed.

View logs

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.

2 participants