fix-config

This commit is contained in:
tangly1024
2023-11-08 23:06:44 +08:00
parent 63064f8224
commit 1bbab7abfe
3 changed files with 5 additions and 6 deletions

View File

@@ -9,7 +9,6 @@
import { getDateValue, getTextContent } from 'notion-utils'
import { getPostBlocks } from './getPostBlocks'
import getAllPageIds from './getAllPageIds'
import BLOG from '@/blog.config'
/**
* 从Notion中读取Config配置表
@@ -18,7 +17,7 @@ import BLOG from '@/blog.config'
*/
export async function getConfigMapFromConfigPage(allPages) {
// 默认返回配置文件
const notionConfig = BLOG
const notionConfig = {}
if (!allPages || !Array.isArray(allPages) || allPages.length === 0) {
console.warn('[Notion配置] 忽略的配置')

View File

@@ -285,7 +285,7 @@ async function getDataBaseInfoByNotionAPI({ pageId, from }) {
})
// 站点配置优先读取配置表格否则读取blog.config.js 文件
const NOTION_CONFIG = await getConfigMapFromConfigPage(collectionData) || BLOG
const NOTION_CONFIG = await getConfigMapFromConfigPage(collectionData) || {}
// Sort by date
if (BLOG.POSTS_SORT_BY === 'date') {