mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 23:16:49 +00:00
封面图
This commit is contained in:
@@ -5,7 +5,7 @@ import getAllPageIds from '@/lib/notion/getAllPageIds'
|
||||
import { getAllTags } from '@/lib/notion/getAllTags'
|
||||
import { getConfigMapFromConfigPage } from '@/lib/notion/getNotionConfig'
|
||||
import getPageProperties, {
|
||||
adjustPageProperties
|
||||
adjustPageProperties
|
||||
} from '@/lib/notion/getPageProperties'
|
||||
import { fetchInBatches, getPage } from '@/lib/notion/getPostBlocks'
|
||||
import { compressImage, mapImgUrl } from '@/lib/notion/mapImage'
|
||||
@@ -51,7 +51,7 @@ export async function getGlobalData({
|
||||
} catch (error) {
|
||||
console.error('异常', error)
|
||||
}
|
||||
return data
|
||||
return handleDataBeforeReturn(deepClone(data))
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,7 +77,7 @@ export async function getNotionPageData({ pageId, from }) {
|
||||
}
|
||||
|
||||
// 返回给前端的数据做处理
|
||||
return handleDataBeforeReturn(deepClone(data))
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// pages/sitemap.xml.js
|
||||
import BLOG from '@/blog.config'
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import { getNotionPageData } from '@/lib/db/getSiteData'
|
||||
import { getGlobalData } from '@/lib/db/getSiteData'
|
||||
import { extractLangId, extractLangPrefix } from '@/lib/utils/pageId'
|
||||
import { getServerSideSitemap } from 'next-sitemap'
|
||||
|
||||
@@ -13,7 +13,7 @@ export const getServerSideProps = async ctx => {
|
||||
const id = extractLangId(siteId)
|
||||
const locale = extractLangPrefix(siteId)
|
||||
// 第一个id站点默认语言
|
||||
const siteData = await getNotionPageData({
|
||||
const siteData = await getGlobalData({
|
||||
pageId: id,
|
||||
from: 'sitemap.xml'
|
||||
})
|
||||
|
||||
@@ -24,7 +24,7 @@ const PostItemCardTop = ({ post, showSummary }) => {
|
||||
// data-aos-anchor-placement='top-bottom'
|
||||
className='mb-6 max-w-screen-3xl '>
|
||||
<div className='flex flex-col w-full'>
|
||||
{siteConfig('MAGZINE_POST_LIST_COVER') && (
|
||||
{siteConfig('MAGZINE_POST_LIST_COVER') && post?.pageCoverThumbnail && (
|
||||
<Link
|
||||
href={post?.href}
|
||||
passHref
|
||||
|
||||
Reference in New Issue
Block a user