diff --git a/components/RecommendPosts.js b/components/RecommendPosts.js
index a42c81e8..abca15a2 100644
--- a/components/RecommendPosts.js
+++ b/components/RecommendPosts.js
@@ -25,7 +25,11 @@ const RecommendPosts = ({ currentPost, totalPosts }) => {
if (currentPost.tags && currentPost.tags.length) {
const currentTag = currentPost.tags[0]
filteredPosts = totalPosts.filter(
- post => post && post.tags && post.tags.includes(currentTag) && post.slug !== currentPost.slug
+ post =>
+ post &&
+ post.tags &&
+ post.tags.includes(currentTag) &&
+ post.slug !== currentPost.slug
)
}
shuffleSort(filteredPosts)
@@ -37,13 +41,21 @@ const RecommendPosts = ({ currentPost, totalPosts }) => {
const { locale } = useGlobal()
- return
-
{locale.COMMON.RELATE_POSTS}
-
-
+ return (
+
+
{locale.COMMON.RELATE_POSTS}
+
+
+ )
}
export default RecommendPosts
diff --git a/components/TagItem.js b/components/TagItem.js
index c9d6a4a7..a3a04866 100644
--- a/components/TagItem.js
+++ b/components/TagItem.js
@@ -13,7 +13,7 @@ const TagItem = ({ tag, selected }) => {
{
return
-
+ : `text-gray-600 dark:text-gray-600 hover:shadow-xl dark:border-gray-400 notion-${tag.color}_background `}` }>
{selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js
index a6cc5b0e..d7701892 100644
--- a/lib/notion/getNotionData.js
+++ b/lib/notion/getNotionData.js
@@ -12,7 +12,10 @@ import { getPostBlocks } from '@/lib/notion/getPostBlocks'
export async function getNotionPageData ({ pageId = BLOG.notionPageId, from }) {
// 尝试从缓存获取
const data = await getDataFromCache('page_record_map_' + pageId)
- if (data) return data
+ if (data) {
+ console.log('[请求缓存]:', `from:${from}`, `id:${pageId}`)
+ return data
+ }
const pageRecordMap = await getPageRecordMapByNotionAPI({ pageId, from })
// 存入缓存
if (pageRecordMap) {
diff --git a/lib/notion/getPostBlocks.js b/lib/notion/getPostBlocks.js
index 299d66d5..ff037545 100644
--- a/lib/notion/getPostBlocks.js
+++ b/lib/notion/getPostBlocks.js
@@ -5,6 +5,7 @@ import { getDataFromCache, setDataToCache } from '@/lib/cache/cache_manager'
export async function getPostBlocks (id, from) {
let pageBlock = await getDataFromCache('page_block_' + id)
if (pageBlock) {
+ console.log('[请求缓存]:', `from:${from}`, `id:${id}`)
return pageBlock
}
const authToken = BLOG.notionAccessToken || null
diff --git a/pages/article/[slug].js b/pages/article/[slug].js
index 39223530..704503b7 100644
--- a/pages/article/[slug].js
+++ b/pages/article/[slug].js
@@ -100,11 +100,12 @@ const ArticleDetail = ({ post, blockMap, tags, prev, next, allPosts, categories
{/* 版权声明 */}
-
-
+
+ 版权声明
+
- 本文作者: {BLOG.author}
- 本文链接: {url}
- - 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
+ - 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!