docs: 品牌升级,优化 README 风格

This commit is contained in:
sanbuphy
2026-03-06 21:59:45 +08:00
parent 5e37fc1109
commit aa080c2097
4 changed files with 888 additions and 35 deletions
+6
View File
@@ -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}`)