docs: 品牌升级,优化 README 风格
This commit is contained in:
@@ -33,6 +33,7 @@ const getBaseUrl = () => {
|
||||
}
|
||||
|
||||
const siteUrl = getBaseUrl()
|
||||
const skipSitemapWrite = process.env.SITEMAP_NO_WRITE === '1'
|
||||
|
||||
// 扫描目录中的所有 markdown 文件
|
||||
function scanMarkdownFiles(dir, basePath = '') {
|
||||
@@ -235,6 +236,11 @@ function main() {
|
||||
}
|
||||
}
|
||||
|
||||
if (skipSitemapWrite) {
|
||||
shouldWrite = false
|
||||
console.log('⏭️ SITEMAP_NO_WRITE=1, skipping sitemap write')
|
||||
}
|
||||
|
||||
if (shouldWrite) {
|
||||
fs.writeFileSync(outputPath, sitemapXml, 'utf-8')
|
||||
console.log(`✅ Sitemap generated at ${outputPath}`)
|
||||
|
||||
Reference in New Issue
Block a user