Skip to content

Commit fcc7786

Browse files
Copilotpaoloricciutidummdidumm
authored
Add redirects for renamed AI docs pages (#1971)
* Add redirects for docs/ai/plugin and docs/ai/opencode-subagent Agent-Logs-Url: https://github.com/sveltejs/svelte.dev/sessions/e0b824eb-b483-4d4f-b414-1630d5e47b41 Co-authored-by: paoloricciuti <26281609+paoloricciuti@users.noreply.github.com> * Update apps/svelte.dev/src/hooks.server.js --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: paoloricciuti <26281609+paoloricciuti@users.noreply.github.com> Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 parent 2375399 commit fcc7786

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

apps/svelte.dev/src/hooks.server.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ export async function handle({ event, resolve }) {
7373
redirect(308, event.url.pathname.replace('/docs/mcp', '/docs/ai'));
7474
}
7575

76+
// Redirect from old ai docs paths to new paths
77+
if (event.url.pathname === '/docs/ai/plugin') {
78+
redirect(307, '/docs/ai/claude-plugin');
79+
}
80+
if (event.url.pathname === '/docs/ai/opencode-subagent') {
81+
redirect(307, '/docs/ai/subagent');
82+
}
83+
7684
// Best effort to redirect from Svelte 3 tutorial to new tutorial
7785
if (event.url.pathname.startsWith('/tutorial/') && event.url.pathname.split('/').length === 2) {
7886
redirect(307, event.url.pathname.replace('/tutorial/', '/tutorial/svelte/'));

0 commit comments

Comments
 (0)