Skip to content

Commit 4db1c5a

Browse files
committed
docs: migrate to routeRules for redirects
1 parent 83216a2 commit 4db1c5a

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

docs/nuxt.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ export default defineNuxtConfig({
3535
autoSubfolderIndex: false
3636
}
3737
},
38+
routeRules: {
39+
'/get-started': { redirect: { to: '/get-started/installation', statusCode: 301 } },
40+
'/configuration': { redirect: { to: '/get-started/configuration', statusCode: 301 } },
41+
'/providers/introduction': { redirect: { to: '/get-started/providers', statusCode: 301 } },
42+
'/components/nuxt-img': { redirect: { to: '/usage/nuxt-img', statusCode: 301 } },
43+
'/components/nuxt-picture': { redirect: { to: '/usage/nuxt-picture', statusCode: 301 } },
44+
'/api/use-image': { redirect: { to: '/usage/use-image', statusCode: 301 } },
45+
},
3846
hooks: {
3947
// Related to https://github.com/nuxt/nuxt/pull/22558
4048
// Adding all global components to the main entry

docs/public/_redirects

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)