mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
修复编译问题
This commit is contained in:
@@ -8,8 +8,8 @@ const ArchiveIndex = props => {
|
||||
const ThemeComponents = ThemeMap[theme]
|
||||
const { siteInfo } = props
|
||||
const meta = {
|
||||
title: `${locale.NAV.ARCHIVE} | ${siteInfo.title}`,
|
||||
description: siteInfo.description,
|
||||
title: `${locale.NAV.ARCHIVE} | ${siteInfo?.title}`,
|
||||
description: siteInfo?.description,
|
||||
slug: 'archive',
|
||||
type: 'website'
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ export default function Category(props) {
|
||||
const { locale } = useGlobal()
|
||||
const { siteInfo } = props
|
||||
const meta = {
|
||||
title: `${locale.COMMON.CATEGORY} | ${siteInfo.title}`,
|
||||
description: siteInfo.description,
|
||||
title: `${locale.COMMON.CATEGORY} | ${siteInfo?.title}`,
|
||||
description: siteInfo?.description,
|
||||
slug: 'category',
|
||||
type: 'website'
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ export async function getStaticProps() {
|
||||
const props = await getGlobalNotionData({ from, pageType: ['Post'] })
|
||||
const { allPosts, siteInfo } = props
|
||||
const meta = {
|
||||
title: `${siteInfo.title} | ${siteInfo.description}`,
|
||||
description: siteInfo.description,
|
||||
title: `${siteInfo?.title} | ${siteInfo?.description}`,
|
||||
description: siteInfo?.description,
|
||||
image: siteInfo.pageCover,
|
||||
slug: '',
|
||||
type: 'website'
|
||||
|
||||
@@ -12,8 +12,8 @@ const Page = props => {
|
||||
return <></>
|
||||
}
|
||||
const meta = {
|
||||
title: `${props.page} | Page | ${siteInfo.title}`,
|
||||
description: siteInfo.description,
|
||||
title: `${props.page} | Page | ${siteInfo?.title}`,
|
||||
description: siteInfo?.description,
|
||||
slug: 'page/' + props.page,
|
||||
type: 'website'
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ const Search = props => {
|
||||
const { locale } = useGlobal()
|
||||
const meta = {
|
||||
title: `${searchKey || ''}${searchKey ? ' | ' : ''}${locale.NAV.SEARCH} | ${
|
||||
siteInfo.title
|
||||
siteInfo?.title
|
||||
}`,
|
||||
description: siteInfo.description,
|
||||
description: siteInfo?.description,
|
||||
slug: 'search',
|
||||
type: 'website'
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ const TagIndex = props => {
|
||||
const { locale } = useGlobal()
|
||||
const { siteInfo } = props
|
||||
const meta = {
|
||||
title: `${locale.COMMON.TAGS} | ${siteInfo.title}`,
|
||||
description: siteInfo.description,
|
||||
title: `${locale.COMMON.TAGS} | ${siteInfo?.title}`,
|
||||
description: siteInfo?.description,
|
||||
slug: 'tag',
|
||||
type: 'website'
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export const Footer = (props) => {
|
||||
// <span className="px-1 busuanzi_value_site_uv"> </span>{' '}
|
||||
// </span>
|
||||
// <br />
|
||||
// <h1>{meta?.title || siteInfo.title}</h1>
|
||||
// <h1>{meta?.title || siteInfo?.title}</h1>
|
||||
// <span className='text-xs font-serif'>
|
||||
// Powered by{' '}
|
||||
// <a
|
||||
|
||||
@@ -25,7 +25,7 @@ function AsideLeft (props) {
|
||||
|
||||
<section className='flex flex-col dark:text-gray-300'>
|
||||
<hr className='w-12 my-8' />
|
||||
{ siteInfo.description }
|
||||
{ siteInfo?.description }
|
||||
</section>
|
||||
|
||||
{router.asPath !== '/tag' && <section className='flex flex-col'>
|
||||
|
||||
@@ -107,7 +107,7 @@ const Header = props => {
|
||||
}}
|
||||
>
|
||||
<div className="absolute flex flex-col h-full items-center justify-center w-full font-sans">
|
||||
<div className='text-4xl md:text-5xl text-white shadow-text'>{siteInfo.title}</div>
|
||||
<div className='text-4xl md:text-5xl text-white shadow-text'>{siteInfo?.title}</div>
|
||||
<div className='mt-2 h-12 items-center text-center shadow-text text-white text-lg'>
|
||||
<span id='typed'/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user