动态配置

This commit is contained in:
tangly1024
2023-11-01 23:13:25 +08:00
parent ef6e9e0d95
commit 3e58c6b637
8 changed files with 43 additions and 45 deletions

View File

@@ -25,7 +25,7 @@ export const siteConfig = (key) => {
if (global) {
val = global.NOTION_CONFIG?.[key]
siteInfo = global.siteInfo
console.log('当前变量', key, val)
// console.log('当前变量', key, val)
}
if (!val) {
@@ -38,7 +38,7 @@ export const siteConfig = (key) => {
val = siteInfo?.icon // 封面图取Notion的封面
break
case 'TITLE':
val = siteConfig('TITLE') // 标题取Notion中的标题
val = siteInfo?.title // 标题取Notion中的标题
break
}
}
@@ -47,6 +47,6 @@ export const siteConfig = (key) => {
if (!val) {
val = BLOG[key]
}
console.log('配置', key, val)
console.log('实际配置', key, val)
return val
}