diff --git a/components/CommonHead.js b/components/CommonHead.js deleted file mode 100644 index cb07bb7f..00000000 --- a/components/CommonHead.js +++ /dev/null @@ -1,45 +0,0 @@ -import BLOG from '@/blog.config' -import Head from 'next/head' - -const CommonHead = ({ meta }) => { - const url = BLOG.path.length ? `${BLOG.link}/${BLOG.path}` : BLOG.link - - return - {meta.title} - - - - {BLOG.seo.googleSiteVerification && ( - - )} - {BLOG.seo.keywords && ( - - )} - - - - - - - - - - {meta.type === 'article' && ( - <> - - - - )} - -} - -export default CommonHead diff --git a/layouts/ArticleLayout.js b/layouts/ArticleLayout.js index 997badaa..4df0d085 100644 --- a/layouts/ArticleLayout.js +++ b/layouts/ArticleLayout.js @@ -4,7 +4,6 @@ import BLOG from '@/blog.config' import formatDate from '@/lib/formatDate' import 'gitalk/dist/gitalk.css' import Comment from '@/components/Comment' -import CommonHead from '@/components/CommonHead' import Progress from '@/components/Progress' import { useRef } from 'react' import Image from 'next/image' @@ -15,6 +14,7 @@ import BlogPostMini from '@/components/BlogPostMini' import { useRouter } from 'next/router' import ShareButton from '@/components/ShareButton' import TopJumper from '@/components/TopJumper' +import { Head } from 'next/document' const mapPageUrl = id => { return 'https://www.notion.so/' + id.replace(/-/g, '') @@ -37,9 +37,30 @@ const ArticleLayout = ({ const targetRef = useRef(null) const { theme } = useTheme() const url = BLOG.link + useRouter().asPath + return (
- + + {meta.title} + + + + + + {meta.type === 'article' && ( + <> + + + + )} + + {/* live2d 看板娘 */}