微调
This commit is contained in:
tangly1024
2021-12-14 12:06:27 +08:00
parent 8148105b92
commit f1724dbe1a
5 changed files with 6 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ const RecommendPosts = ({ currentPost, totalPosts }) => {
const { locale } = useGlobal()
return (
<div className="dark:text-gray-300">
<div className="dark:text-gray-300 pt-2">
<div className="mb-2 text-2xl">{locale.COMMON.RELATE_POSTS}</div>
<ul className="list-disc pl-6 text-sm dark:bg-gray-900 bg-gray-100 p-2 my-2 border-l-4 border-yellow-500">
{filteredPosts.map(post => (

View File

@@ -80,7 +80,7 @@ const BaseLayout = ({
<div className='flex flex-grow min-h-screen' ref={targetRef}>
{onLoading
? <LoadingCover/>
: <div className='flex-grow bg-gray-50 dark:bg-black shadow-inner animate__animated animate__fadeIn'>
: <div className='flex-grow bg-gray-50 dark:bg-black shadow-inner'>
{children}
</div>
}

View File

@@ -1,5 +1,4 @@
import fs from 'fs'
import BLOG from '@/blog.config'
const path = require('path')
// 文件缓存持续10秒

View File

@@ -1,6 +1,9 @@
import { idToUuid } from 'notion-utils'
export default function getAllPageIds (collectionQuery, viewId) {
if (!collectionQuery) {
return []
}
const views = Object.values(collectionQuery)[0]
if (!views) {
return []

View File

@@ -29,7 +29,7 @@ export async function getStaticProps ({ params }) {
const allPosts = await getAllPosts({ notionPageData, from })
const categories = await getAllCategories(allPosts)
const tagOptions = notionPageData.tagOptions
const tags = await getAllTags({ allPosts, tagOptions })
const tags = await getAllTags({ allPosts, tagOptions, sliceCount: 0 })
const filteredPosts = allPosts.filter(
post => post && post.tags && post.tags.includes(currentTag)
)