Skip to content

fix: prevent 404 on llms.txt links after client-side navigation#2079

Open
imlargo wants to merge 1 commit into
sveltejs:mainfrom
imlargo:main
Open

fix: prevent 404 on llms.txt links after client-side navigation#2079
imlargo wants to merge 1 commit into
sveltejs:mainfrom
imlargo:main

Conversation

@imlargo

@imlargo imlargo commented Jul 5, 2026

Copy link
Copy Markdown

Summary

  • The llms.txt link at the bottom of doc pages (and on /docs/llms) points to a route that only has a +server.ts (no +page.svelte). SvelteKit's client-side router intercepted the click and tried to render it as an SPA page, which fails since there's no page component — resulting in a client-rendered 404. A hard reload bypasses the client router entirely and hits the server route directly, which works correctly.
  • Add data-sveltekit-reload to these links so they always perform a full browser navigation instead of being intercepted by the SPA router.

Test plan

  • Visit a docs page (e.g. /docs/kit/adapter-cloudflare#Usage) and click the llms.txt link at the bottom, confirm it loads the file instead of a 404.
  • Visit /docs/llms and click each of the listed llms*.txt links, confirm they all load correctly.

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

@imlargo is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant