[go: nahoru, domu]

Skip to content

Commit

Permalink
取消自动清理sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Jun 28, 2024
1 parent 3220bf4 commit 6740261
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ const locales = (function () {
})()

// 编译前执行
const preBuild = (function () {
// 删除 public/sitemap.xml 文件 ; 否则会和/pages/sitemap.xml.js 冲突。
const sitemapPath = path.resolve(__dirname, 'public', 'sitemap.xml')
if (fs.existsSync(sitemapPath)) {
fs.unlinkSync(sitemapPath)
console.log('Deleted existing sitemap.xml from public directory')
}
})()
// const preBuild = (function () {
// // 删除 public/sitemap.xml 文件 ; 否则会和/pages/sitemap.xml.js 冲突。
// const sitemapPath = path.resolve(__dirname, 'public', 'sitemap.xml')
// if (fs.existsSync(sitemapPath)) {
// fs.unlinkSync(sitemapPath)
// console.log('Deleted existing sitemap.xml from public directory')
// }
// })()

/**
* 扫描指定目录下的文件夹名,用于获取所有主题
Expand Down

0 comments on commit 6740261

Please sign in to comment.