mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
feature:
文章详情页关键词SEO
This commit is contained in:
@@ -20,7 +20,7 @@ const BLOG = {
|
||||
autoCollapsedNavBar: false, // the automatically collapsed navigation bar
|
||||
socialLink: 'https://weibo.com/u/2245301913',
|
||||
seo: {
|
||||
keywords: ['建站', '自媒体', 'Notion', '赚钱', '写作', '副业'],
|
||||
keywords: ['建站', 'Notion', '赚钱', '写作', '副业'],
|
||||
googleSiteVerification: '' // Remove the value or replace it with your own google site verification code
|
||||
},
|
||||
analytics: {
|
||||
|
||||
@@ -9,9 +9,11 @@ const CommonHead = ({ meta }) => {
|
||||
const title = meta?.title || BLOG.title
|
||||
const description = meta?.description || BLOG.description
|
||||
const type = meta?.type || 'website'
|
||||
const keywords = meta?.tags || BLOG.seo.keywords
|
||||
|
||||
return <Head>
|
||||
<title>{title}</title>
|
||||
<meta content={BLOG.darkBackground} name='theme-color' />
|
||||
<meta name='theme-color' content={BLOG.darkBackground} />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
|
||||
<meta name='robots' content='follow, index' />
|
||||
<meta charSet='UTF-8' />
|
||||
@@ -21,8 +23,8 @@ const CommonHead = ({ meta }) => {
|
||||
content={BLOG.seo.googleSiteVerification}
|
||||
/>
|
||||
)}
|
||||
{BLOG.seo.keywords && (
|
||||
<meta name='keywords' content={BLOG.seo.keywords.join(', ')} />
|
||||
{keywords && (
|
||||
<meta name='keywords' content={keywords.join(', ')} />
|
||||
)}
|
||||
<meta name='description' content={description} />
|
||||
<meta property='og:locale' content={BLOG.lang} />
|
||||
|
||||
@@ -35,7 +35,8 @@ const ArticleDetail = ({ post, blockMap, tags, prev, next, posts, categories })
|
||||
const meta = {
|
||||
title: `${post.title} | ${BLOG.title}`,
|
||||
description: post.summary,
|
||||
type: 'article'
|
||||
type: 'article',
|
||||
tags: post.tags
|
||||
}
|
||||
const targetRef = useRef(null)
|
||||
const drawerRight = useRef(null)
|
||||
|
||||
Reference in New Issue
Block a user