1
1
mirror of https://github.com/primer/css.git synced 2024-11-28 13:12:16 +03:00

add redirect from /objects/layout -> /objects/grid

This commit is contained in:
Shawn Allen 2019-09-12 13:11:23 -07:00
parent e5c4062bf4
commit b1a9d6d2c0

11
docs/gatsby-node.js Normal file
View File

@ -0,0 +1,11 @@
const redirects = {
'/css/objects/layout': '/css/objects/grid',
'/css/objects/layout/': '/css/objects/grid/'
}
exports.createPages = ({actions: {createRedirect}}) => {
for (const [fromPath, toPath] of Object.entries(redirects)) {
// console.warn(`[redirect] ${fromPath} → ${toPath}`)
createRedirect({fromPath, toPath, redirectInBrowser: true})
}
}