fix: 修复分类和标签设置为false时在自动生成front matter中依然有分类标签数据的问题

This commit is contained in:
xugaoyi 2022-04-21 09:44:46 +08:00
parent 6b3b4804f5
commit 8f3df4a892
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ const PREFIX = '/pages/'
* .md文件设置frontmatter(标题日期永久链接等数据)
*/
function setFrontmatter(sourceDir, themeConfig) {
const { isCategory, isTag, categoryText = '随笔', extendFrontmatter } = themeConfig
const { category: isCategory, tag: isTag, categoryText = '随笔', extendFrontmatter } = themeConfig
const files = readFileList(sourceDir) // 读取所有md文件数据
// 扩展自定义生成frontmatter
const extendFrontmatterStr = extendFrontmatter ?