diff --git a/blog.config.js b/blog.config.js index d1a836db..38daef7a 100644 --- a/blog.config.js +++ b/blog.config.js @@ -295,7 +295,7 @@ const BLOG = { // ----> 站点统计 ANALYTICS_VERCEL: process.env.NEXT_PUBLIC_ANALYTICS_VERCEL || false, // vercel自带的统计 https://vercel.com/docs/concepts/analytics/quickstart https://github.com/tangly1024/NotionNext/issues/897 - ANALYTICS_BUSUANZI_ENABLE: true, // 展示网站阅读量、访问数 see http://busuanzi.ibruce.info/ + ANALYTICS_BUSUANZI_ENABLE: process.env.NEXT_PUBLIC_ANALYTICS_BUSUANZI_ENABLE || true, // 展示网站阅读量、访问数 see http://busuanzi.ibruce.info/ ANALYTICS_BAIDU_ID: process.env.NEXT_PUBLIC_ANALYTICS_BAIDU_ID || '', // e.g 只需要填写百度统计的id,[baidu_id] -> https://hm.baidu.com/hm.js?[baidu_id] ANALYTICS_CNZZ_ID: process.env.NEXT_PUBLIC_ANALYTICS_CNZZ_ID || '', // 只需要填写站长统计的id, [cnzz_id] -> https://s9.cnzz.com/z_stat.php?id=[cnzz_id]&web_id=[cnzz_id] ANALYTICS_GOOGLE_ID: process.env.NEXT_PUBLIC_ANALYTICS_GOOGLE_ID || '', // 谷歌Analytics的id e.g: G-XXXXXXXXXX diff --git a/themes/heo/components/PostHeader.js b/themes/heo/components/PostHeader.js index 55f1a37c..dd1330f8 100644 --- a/themes/heo/components/PostHeader.js +++ b/themes/heo/components/PostHeader.js @@ -85,7 +85,7 @@ export default function PostHeader({ post, siteInfo }) { - {BLOG.ANALYTICS_BUSUANZI_ENABLE &&
+ {JSON.parse(BLOG.ANALYTICS_BUSUANZI_ENABLE) &&
} diff --git a/themes/hexo/components/PostHeader.js b/themes/hexo/components/PostHeader.js index 9701bb6e..e6f09c22 100644 --- a/themes/hexo/components/PostHeader.js +++ b/themes/hexo/components/PostHeader.js @@ -46,7 +46,7 @@ export default function PostHeader({ post, siteInfo }) { passHref className="pl-1 mr-2 cursor-pointer hover:underline"> - {locale.COMMON.POST_TIME}:{post?.publishTime} + {locale.COMMON.POST_TIME}: {post?.publishTime} @@ -56,7 +56,7 @@ export default function PostHeader({ post, siteInfo }) {
- {BLOG.ANALYTICS_BUSUANZI_ENABLE &&
+ {JSON.parse(BLOG.ANALYTICS_BUSUANZI_ENABLE) &&
{locale.COMMON.VIEWS}
} diff --git a/themes/matery/components/ArticleInfo.js b/themes/matery/components/ArticleInfo.js index af61bb72..bb816059 100644 --- a/themes/matery/components/ArticleInfo.js +++ b/themes/matery/components/ArticleInfo.js @@ -27,11 +27,11 @@ export const ArticleInfo = (props) => { passHref className="cursor-pointer whitespace-nowrap"> - {locale.COMMON.POST_TIME}:{post?.publishTime} + {locale.COMMON.POST_TIME}: {post?.publishTime} - {locale.COMMON.LAST_EDITED_TIME}:{post.lastEditedTime} + {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime}