+
-
- >
}
export default ShareBar
diff --git a/themes/next/components/ShareButton.js b/components/ShareButton.js
similarity index 100%
rename from themes/next/components/ShareButton.js
rename to components/ShareButton.js
diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js
index e723a83d..9b586e65 100644
--- a/lib/notion/getNotionData.js
+++ b/lib/notion/getNotionData.js
@@ -65,7 +65,7 @@ export async function getNotionPageData({ pageId, from }) {
const cacheKey = 'page_block_' + pageId
const data = await getDataFromCache(cacheKey)
if (data && data.pageIds?.length > 0) {
- console.log('[命中缓存]:', `from:${from}`, `root-page-id:${pageId}`)
+ console.log('[缓存]:', `from:${from}`, `root-page-id:${pageId}`)
return data
}
const pageRecordMap = await getDataBaseInfoByNotionAPI({ pageId, from })
diff --git a/lib/notion/getPostBlocks.js b/lib/notion/getPostBlocks.js
index 5fe2af84..8e764f7b 100644
--- a/lib/notion/getPostBlocks.js
+++ b/lib/notion/getPostBlocks.js
@@ -14,7 +14,7 @@ export async function getPostBlocks(id, from, slice) {
const cacheKey = 'page_block_' + id
let pageBlock = await getDataFromCache(cacheKey)
if (pageBlock) {
- console.log('[命中缓存]:', `from:${from}`, cacheKey)
+ console.log('[缓存]:', `from:${from}`, cacheKey)
return filterPostBlocks(id, pageBlock, slice)
}
diff --git a/themes/example/LayoutSlug.js b/themes/example/LayoutSlug.js
index b16892b7..b19f51ff 100644
--- a/themes/example/LayoutSlug.js
+++ b/themes/example/LayoutSlug.js
@@ -3,6 +3,7 @@ import { ArticleLock } from './components/ArticleLock'
import NotionPage from '@/components/NotionPage'
import { ArticleInfo } from './components/ArticleInfo'
import Comment from '@/components/Comment'
+import ShareBar from '@/components/ShareBar'
export const LayoutSlug = props => {
const { post, lock, validPassword } = props
@@ -17,10 +18,10 @@ export const LayoutSlug = props => {
{lock &&
}
{!lock &&
}
diff --git a/themes/fukasawa/components/ArticleDetail.js b/themes/fukasawa/components/ArticleDetail.js
index 65af8400..e9e82b0f 100644
--- a/themes/fukasawa/components/ArticleDetail.js
+++ b/themes/fukasawa/components/ArticleDetail.js
@@ -1,5 +1,6 @@
import Comment from '@/components/Comment'
import NotionPage from '@/components/NotionPage'
+import ShareBar from '@/components/ShareBar'
import formatDate from '@/lib/formatDate'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
@@ -84,6 +85,11 @@ export default function ArticleDetail(props) {
{post &&
}
+
+
{/* 文章内嵌广告 */}
{
const { post, lock, validPassword } = props
@@ -76,6 +77,9 @@ export const LayoutSlug = props => {
+ {/* 分享 */}
+
+
{/* 评论互动 */}
diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js
index 12fefce4..e938942b 100644
--- a/themes/matery/LayoutSlug.js
+++ b/themes/matery/LayoutSlug.js
@@ -10,6 +10,7 @@ import { ArticleInfo } from './components/ArticleInfo'
import Catalog from './components/Catalog'
import JumpToCommentButton from './components/JumpToCommentButton'
import throttle from 'lodash.throttle'
+import ShareBar from '@/components/ShareBar'
export const LayoutSlug = props => {
const { post, lock, validPassword } = props
@@ -87,7 +88,8 @@ export const LayoutSlug = props => {
-
+ {/* 分享 */}
+
{/* 评论互动 */}
diff --git a/themes/medium/LayoutSlug.js b/themes/medium/LayoutSlug.js
index 6000c3f3..b6d54077 100644
--- a/themes/medium/LayoutSlug.js
+++ b/themes/medium/LayoutSlug.js
@@ -13,6 +13,7 @@ import ArticleAround from './components/ArticleAround'
import TocDrawer from './components/TocDrawer'
import CategoryItem from './components/CategoryItem'
import TagItemMini from './components/TagItemMini'
+import ShareBar from '@/components/ShareBar'
export const LayoutSlug = props => {
const { post, prev, next, siteInfo, lock, validPassword } = props
@@ -92,6 +93,8 @@ export const LayoutSlug = props => {
{post.type === 'Post' && }
+ {/* 分享 */}
+
diff --git a/themes/next/components/ArticleDetail.js b/themes/next/components/ArticleDetail.js
index e5b8dba2..75fc7f7d 100644
--- a/themes/next/components/ArticleDetail.js
+++ b/themes/next/components/ArticleDetail.js
@@ -2,7 +2,7 @@ import BLOG from '@/blog.config'
import BlogAround from './BlogAround'
import Comment from '@/components/Comment'
import RecommendPosts from './RecommendPosts'
-import ShareBar from './ShareBar'
+import ShareBar from '@/components/ShareBar'
import TagItem from './TagItem'
import formatDate from '@/lib/formatDate'
import { useGlobal } from '@/lib/global'
@@ -100,6 +100,9 @@ export default function ArticleDetail(props) {
{/* 推荐文章 */}
{post.type === 'Post' &&
}
+ {/* 分享 */}
+
+
{/* 分类 */}
{post.category && <>
@@ -124,7 +127,6 @@ export default function ArticleDetail(props) {
))}
>
)}
diff --git a/themes/next/config_next.js b/themes/next/config_next.js
index 5504b8df..d341cee0 100644
--- a/themes/next/config_next.js
+++ b/themes/next/config_next.js
@@ -30,7 +30,6 @@ const CONFIG_NEXT = {
WIDGET_DARK_MODE: false, // 显示日间/夜间模式切换
WIDGET_TOC: true, // 移动端显示悬浮目录
- ARTICLE_SHARE: process.env.NEXT_PUBLIC_ARTICLE_SHARE || false, // 文章分享功能
ARTICLE_RELATE_POSTS: true, // 相关文章推荐
ARTICLE_COPYRIGHT: true // 文章版权声明
diff --git a/themes/nobelium/LayoutSlug.js b/themes/nobelium/LayoutSlug.js
index d60062a0..d27628af 100644
--- a/themes/nobelium/LayoutSlug.js
+++ b/themes/nobelium/LayoutSlug.js
@@ -4,6 +4,7 @@ import NotionPage from '@/components/NotionPage'
import { ArticleInfo } from './components/ArticleInfo'
import Comment from '@/components/Comment'
import { ArticleFooter } from './components/ArticleFooter'
+import ShareBar from '@/components/ShareBar'
export const LayoutSlug = props => {
const { post, lock, validPassword } = props
@@ -21,6 +22,7 @@ export const LayoutSlug = props => {
{post && <>