gridsome-plugin-netlify-redirects
v1.0.0
Published
Create redirects for Netlify while building the website
Downloads
2
Maintainers
Readme
Gridsome plugin Netlify redirects
Create redirects for Netlify while building the website.
Install
npm i --save gridsome-plugin-netlify-redirects
Setup
{
use: 'gridsome-plugin-netlify-redirects',
options: {
typeName: 'NetlifyRedirects',
redirects: [
{
from: '/blog'
to: '/store'
status: 302
},
{
from: '/home'
to: '/store'
status: 302
}
]
}
}
You can add more redirects during build to the collection you've defined in the typeName option. Redirects are nodes of the NetlifyRedirects collection by default. You can add nodes using the Gridsome API to the collection while building the website to add more redirects.