SEO优化
This commit is contained in:
tangly1024
2021-12-06 17:29:38 +08:00
parent 23f143bdd8
commit 2cd75f3e34
11 changed files with 22 additions and 23 deletions

View File

@@ -28,7 +28,7 @@ export default function Custom404 () {
<div
className='text-black w-full h-screen text-center justify-center content-center items-center flex flex-col'>
<div className='dark:text-gray-200'>
<h1 className='inline-block border-r-2 border-gray-600 mr-2 px-3 py-2 align-top'><FontAwesomeIcon icon={faSpinner} spin={true} className='mr-2'/>404</h1>
<h2 className='inline-block border-r-2 border-gray-600 mr-2 px-3 py-2 align-top'><FontAwesomeIcon icon={faSpinner} spin={true} className='mr-2'/>404</h2>
<div className='inline-block text-left h-32 leading-10 align-middle'>
<h2 className='m-0 p-0'>页面无法加载即将返回首页</h2>
</div>

View File

@@ -3,7 +3,7 @@ import 'rc-dropdown/assets/index.css'
import 'katex/dist/katex.min.css'
import '@/styles/globals.css'
import 'animate.css'
import BLOG from '@/blog.config'
import BLOG from 'blog.config'
import dynamic from 'next/dynamic'
import { GlobalContextProvider } from '@/lib/global'

View File

@@ -37,7 +37,7 @@ const ArticleDetail = ({ post, blockMap, tags, prev, next, allPosts, categories
return <Custom404 />
}
const meta = {
title: `${post.title} | ${BLOG.title}`,
title: `${post.title}`,
description: post.summary,
type: 'article',
tags: post.tags
@@ -60,9 +60,9 @@ const ArticleDetail = ({ post, blockMap, tags, prev, next, allPosts, categories
</header>
</>)}
<article className='animate__fadeIn animate__animated subpixel-antialiased lg:pt-32 lg:px-44 px-5 py-2 dark:border-gray-700 bg-white dark:bg-gray-800'>
<article itemScope itemType="https://schema.org/Movie" className='animate__fadeIn animate__animated subpixel-antialiased lg:pt-32 lg:px-44 px-5 py-2 dark:border-gray-700 bg-white dark:bg-gray-800'>
{/* 文章Title */}
<h1 className='font-bold text-3xl pt-5 text-black dark:text-white italic'> {post.title}</h1>
<h2 className='font-bold text-3xl pt-5 text-black dark:text-white italic'> {post.title}</h2>
<hr className='mt-4' />
<section className='flex-nowrap flex mt-1 dark:text-white'>
<Link href={`/category/${post.category}`} passHref>