更新时间:2023-12-01 23:16:22
有一堆 deletePage
如果页面为src/pages/demo.js
,则会在创建过程中删除该页面.
If you have a page src/pages/demo.js
, this will delete that page during creation.
// gatsby-node.js
exports.onCreatePage = async ({ page, actions: { deletePage } }) => {
if (page.path.match(/^\/demo/)) {
deletePage(page)
}
}