修复编译问题

This commit is contained in:
tangly1024
2022-04-29 10:29:50 +08:00
parent 33ac2ef00f
commit 096623d9dc
9 changed files with 15 additions and 15 deletions

View File

@@ -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'
}

View File

@@ -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'
}

View File

@@ -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'

View File

@@ -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'
}

View File

@@ -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'
}

View File

@@ -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'
}

View File

@@ -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

View File

@@ -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'>

View File

@@ -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>