mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
SEO simple
This commit is contained in:
@@ -19,7 +19,7 @@ const CommonHead = ({ meta, children }) => {
|
||||
<Head>
|
||||
<title>{title}</title>
|
||||
<meta name="theme-color" content={BLOG.BACKGROUND_DARK} />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, minimum-scale=1.0"/>
|
||||
<meta name="robots" content="follow, index" />
|
||||
<meta charSet="UTF-8" />
|
||||
{BLOG.SEO_GOOGLE_SITE_VERIFICATION && (
|
||||
|
||||
@@ -9,7 +9,7 @@ export const BlogItem = props => {
|
||||
return <div key={post.id} className="mb-10 pb-12 border-b dark:border-gray-800" >
|
||||
{/* 文章标题 */}
|
||||
|
||||
<h2 className="mb-5 ">
|
||||
<h2 className="mb-2">
|
||||
<Link
|
||||
href={`/${post.slug}`}
|
||||
className="blog-item-title font-bold text-black text-2xl no-underline hover:underline">
|
||||
@@ -19,18 +19,21 @@ export const BlogItem = props => {
|
||||
|
||||
{/* 文章信息 */}
|
||||
|
||||
<div className="mb-4 text-md space-x-2 text-gray-700 dark:text-gray-300 flex-wrap flex">
|
||||
<span> <i className="fa-regular fa-user"></i> <a href={CONFIG_SIMPLE.AUTHOR_LINK}>{BLOG.AUTHOR}</a></span>
|
||||
<span>
|
||||
<Link href={`/archive#${post?.date?.start_date?.substr(0, 7)}`}>
|
||||
<i className="fa-regular fa-clock" /> {post.date?.start_date || post.createdTime}
|
||||
</Link>
|
||||
</span>
|
||||
<span> <TwikooCommentCount post={post} /></span>
|
||||
|
||||
{post.category && <span> <i className="fa-regular fa-folder"></i> <a href={`/category/${post.category}`} className="hover:text-red-400 transition-all duration-200">{post.category}</a></span>}
|
||||
{post.tags && post.tags?.length > 0 && post.tags.map(t => <span key={t}> / <Link href={`/tag/${t}`}><span className=' hover:text-red-400 transition-all duration-200'>{t}</span></Link></span>)}
|
||||
<div className="mb-5 text-md text-gray-700 dark:text-gray-300 flex-wrap flex leading-6">
|
||||
<div className='space-x-2'>
|
||||
<span> <a href={CONFIG_SIMPLE.AUTHOR_LINK} className='p-1 hover:text-red-400 transition-all duration-200'><i className="fa-regular fa-user"></i> {BLOG.AUTHOR}</a></span>
|
||||
<span>
|
||||
<Link className='p-1 hover:text-red-400 transition-all duration-200' href={`/archive#${post?.date?.start_date?.substr(0, 7)}`}>
|
||||
<i className="fa-regular fa-clock" /> {post.date?.start_date || post.createdTime}
|
||||
</Link>
|
||||
</span>
|
||||
<span><TwikooCommentCount post={post} /></span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{post.category && <Link href={`/category/${post.category}`} className='p-1'> <span className="hover:text-red-400 transition-all duration-200"><i className="fa-regular fa-folder mr-0.5"/>{post.category}</span></Link>}
|
||||
{post.tags && post.tags?.length > 0 && post.tags.map(t => <Link key={t} href={`/tag/${t}`} className=' hover:text-red-400 transition-all duration-200'><span > /{t}</span></Link>)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="text-gray-700 dark:text-gray-300 leading-normal mb-6">
|
||||
|
||||
@@ -26,12 +26,12 @@ export const BlogListPage = props => {
|
||||
<div className="flex justify-between text-xs">
|
||||
<Link
|
||||
href={{ pathname: currentPage - 1 === 1 ? `${pagePrefix}/` : `${pagePrefix}/page/${currentPage - 1}`, query: router.query.s ? { s: router.query.s } : {} }}
|
||||
className={`${showPrev ? 'text-blue-400 border-b border-blue-400 visible ' : ' invisible bg-gray pointer-events-none '} no-underline pb-1 px-3`}>
|
||||
className={`${showPrev ? 'text-blue-600 border-b border-blue-400 visible ' : ' invisible bg-gray pointer-events-none '} no-underline pb-1 px-3`}>
|
||||
NEWER POSTS <i className="fa-solid fa-arrow-left"></i>
|
||||
</Link>
|
||||
<Link
|
||||
href={{ pathname: `${pagePrefix}/page/${currentPage + 1}`, query: router.query.s ? { s: router.query.s } : {} }}
|
||||
className={`${showNext ? 'text-blue-400 border-b border-blue-400 visible' : ' invisible bg-gray pointer-events-none '} no-underline pb-1 px-3`}>
|
||||
className={`${showNext ? 'text-blue-600 border-b border-blue-400 visible' : ' invisible bg-gray pointer-events-none '} no-underline pb-1 px-3`}>
|
||||
OLDER POSTS <i className="fa-solid fa-arrow-right"></i>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@ export const Header = (props) => {
|
||||
<div className='flex space-x-6'>
|
||||
<div className='hover:rotate-45 hover:scale-125 transform duration-200 cursor-pointer'>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src={avatar} className='rounded-full' width={130} alt={BLOG.AUTHOR} />
|
||||
<img src={avatar} className='rounded-full' width={130} height={130} alt={BLOG.AUTHOR} />
|
||||
</div>
|
||||
|
||||
<div className='flex-col flex justify-center'>
|
||||
|
||||
Reference in New Issue
Block a user