Using slugs dynamically
This commit is contained in:
@@ -26,7 +26,10 @@ exports.createPages = ({ graphql, boundActionCreators }) => {
|
||||
result.data.allWordpressPage.edges.forEach(({ node }) => {
|
||||
createPage({
|
||||
path: node.slug,
|
||||
component: path.resolve('./src/pages/page.js'),
|
||||
component: path.resolve('./src/pages/page-default.js'),
|
||||
context: {
|
||||
slug: node.slug,
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user