【发布时间】:2020-01-10 14:27:47
【问题描述】:
createPage({
path: `product/${node.id}/[any-matching-string]`,
component: path.resolve(`./src/templates/productDetail.js`),
context: {
productId: node.id
},
})
路径:product/${node.id}/[any-matching-string],
我如何实现这样的路径?
url: someurl/product/id/[任意字符串]
【问题讨论】:
-
您要在
product创建动态路由吗? stackoverflow.com/questions/55756994/…
标签: gatsby