mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 15:09:28 +00:00
fix
This commit is contained in:
@@ -250,13 +250,13 @@ function getCategoryOptions(schema) {
|
||||
* @param from
|
||||
* @returns {Promise<{title,description,pageCover,icon}>}
|
||||
*/
|
||||
function getSiteInfo({ collection, block, NOTION_CONFIG }) {
|
||||
function getSiteInfo({ collection, block, NOTION_CONFIG, pageId }) {
|
||||
const title = collection?.name?.[0][0] || BLOG.TITLE
|
||||
const description = collection?.description
|
||||
? Object.assign(collection).description[0][0]
|
||||
: BLOG.DESCRIPTION
|
||||
const pageCover = collection?.cover
|
||||
? mapImgUrl(collection?.cover, block[idToUuid(BLOG.NOTION_PAGE_ID)]?.value)
|
||||
? mapImgUrl(collection?.cover, block[idToUuid(pageId)]?.value)
|
||||
: BLOG.HOME_BANNER_IMAGE
|
||||
// 用户头像压缩一下
|
||||
let icon = compressImage(
|
||||
@@ -452,7 +452,7 @@ async function getDataBaseInfoByNotionAPI({ pageId, from }) {
|
||||
// 站点配置优先读取配置表格,否则读取blog.config.js 文件
|
||||
const NOTION_CONFIG = (await getConfigMapFromConfigPage(collectionData)) || {}
|
||||
|
||||
const siteInfo = getSiteInfo({ collection, block })
|
||||
const siteInfo = getSiteInfo({ collection, block, pageId })
|
||||
|
||||
// 查找所有的Post和Page
|
||||
const allPages = collectionData.filter(post => {
|
||||
|
||||
Reference in New Issue
Block a user