Skip to content

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented Oct 23, 2024

continuing work on #540

It seems I duplicated some existing redirects, but I'm not sure which ones or where they live

https://svelte.dev/docs/svelte-easing already redirects, but https://svelte.dev/docs/typescript doesn't. Any idea where the first redirect lives?

Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kit-svelte-dev 🔄 Building (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 9:38pm
learn-svelte-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 9:38pm
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 9:38pm
svelte-5-preview 🔄 Building (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 9:38pm
svelte-dev 🔄 Building (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 9:38pm

@Rich-Harris
Copy link
Member

here

if (!document) {
// in many cases, https://svelte.dev/docs/foo is now https://svelte.dev/docs/svelte/foo
if (docs.pages[`docs/svelte/${params.path}`]) {
redirect(308, `/docs/svelte/${params.path}`);
}
error(404, 'Not found');
}

@Rich-Harris
Copy link
Member

(I don't understand why the second link isn't redirecting)

@Rich-Harris
Copy link
Member

(it does redirect in dev)

@benmccann
Copy link
Member Author

benmccann commented Oct 23, 2024

I don't know either. It looks like just that one and another one that are broken: https://svelte.dev/docs/basic-markup

I was going to say maybe just the reference docs work, but v4-migration-guide seems to work. It's really strange. I think I'll just move the layout redirects since they don't seem to be working

@benmccann
Copy link
Member Author

Although I suppose leaving the layout redirect there doesn't hurt just in case there's something I overlooked

@Rich-Harris
Copy link
Member

I think I understand what's happening — the redirects need to be prerendered, and the /docs/typescript page isn't but /docs/svelte-easing is. The real mystery is why some redirects are being prerendered

@benmccann benmccann mentioned this pull request Oct 23, 2024
@benmccann benmccann merged commit 59fbe47 into main Oct 23, 2024
7 checks passed
@benmccann benmccann deleted the more-redirects-again branch October 23, 2024 22:37
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