mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 07:26:47 +00:00
dev:
微调
This commit is contained in:
@@ -42,7 +42,7 @@ const RecommendPosts = ({ currentPost, totalPosts }) => {
|
|||||||
const { locale } = useGlobal()
|
const { locale } = useGlobal()
|
||||||
|
|
||||||
return (
|
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>
|
<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">
|
<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 => (
|
{filteredPosts.map(post => (
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ const BaseLayout = ({
|
|||||||
<div className='flex flex-grow min-h-screen' ref={targetRef}>
|
<div className='flex flex-grow min-h-screen' ref={targetRef}>
|
||||||
{onLoading
|
{onLoading
|
||||||
? <LoadingCover/>
|
? <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}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
1
lib/cache/local_file_cache.js
vendored
1
lib/cache/local_file_cache.js
vendored
@@ -1,5 +1,4 @@
|
|||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import BLOG from '@/blog.config'
|
|
||||||
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
// 文件缓存持续10秒
|
// 文件缓存持续10秒
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import { idToUuid } from 'notion-utils'
|
import { idToUuid } from 'notion-utils'
|
||||||
|
|
||||||
export default function getAllPageIds (collectionQuery, viewId) {
|
export default function getAllPageIds (collectionQuery, viewId) {
|
||||||
|
if (!collectionQuery) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
const views = Object.values(collectionQuery)[0]
|
const views = Object.values(collectionQuery)[0]
|
||||||
if (!views) {
|
if (!views) {
|
||||||
return []
|
return []
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export async function getStaticProps ({ params }) {
|
|||||||
const allPosts = await getAllPosts({ notionPageData, from })
|
const allPosts = await getAllPosts({ notionPageData, from })
|
||||||
const categories = await getAllCategories(allPosts)
|
const categories = await getAllCategories(allPosts)
|
||||||
const tagOptions = notionPageData.tagOptions
|
const tagOptions = notionPageData.tagOptions
|
||||||
const tags = await getAllTags({ allPosts, tagOptions })
|
const tags = await getAllTags({ allPosts, tagOptions, sliceCount: 0 })
|
||||||
const filteredPosts = allPosts.filter(
|
const filteredPosts = allPosts.filter(
|
||||||
post => post && post.tags && post.tags.includes(currentTag)
|
post => post && post.tags && post.tags.includes(currentTag)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user