feat: update the redirect config

This commit is contained in:
KazooTTT
2024-11-23 23:32:26 +08:00
parent 7292415765
commit 9deaee2ad7

View File

@ -30,13 +30,34 @@ export default defineConfig({
} }
}), }),
redirects: { redirects: {
'/articles': '/posts', '/articles': {
'/articles/[...slug]': '/blogs/[...slug]', status: 301,
'/category': '/categories', destination: '/posts'
'/category/[...slug]': '/categories/[...slug]', },
'/tag': '/tags', '/articles/*': {
'/tag/[...slug]': '/tags/[...slug]', status: 301,
'/about': '/' destination: '/blogs/*'
},
'/category': {
status: 301,
destination: '/categories'
},
'/category/*': {
status: 301,
destination: '/categories/*'
},
'/tag': {
status: 301,
destination: '/tags'
},
'/tag/*': {
status: 301,
destination: '/tags/*'
},
'/about': {
status: 301,
destination: '/'
}
}, },
integrations: [ integrations: [
expressiveCode(expressiveCodeOptions), expressiveCode(expressiveCodeOptions),