Merge pull request #305 from tangly1024/feat-recent-comments

最新评论插件可配置
This commit is contained in:
tangly1024
2022-06-15 13:49:42 +08:00
committed by GitHub
3 changed files with 3 additions and 2 deletions

View File

@@ -108,6 +108,7 @@ const BLOG = {
COMMENT_VALINE_PLACEHOLDER: process.env.NEXT_PUBLIC_VALINE_PLACEHOLDER || '抢个沙发吧~', // 可以搭配后台管理评论 https://github.com/DesertsP/Valine-Admin 便于查看评论,以及邮件通知,垃圾评论过滤等功能
COMMENT_WALINE_SERVER_URL: process.env.NEXT_PUBLIC_WALINE_SERVER_URL || '', // Waline 评论 @see https://waline.js.org/guide/get-started.html
COMMENT_WALINE_RECENT: process.env.NEXT_PUBLIC_WALINE_RECENT || false, // 最新评论
// 站点统计
ANALYTICS_BUSUANZI_ENABLE: true, // 展示网站阅读量、访问数 see http://busuanzi.ibruce.info/

View File

@@ -38,7 +38,7 @@ export const SideBar = (props) => {
</div>
</aside>
{BLOG.COMMENT_WALINE_SERVER_URL && <aside className="rounded shadow overflow-hidden mb-6">
{BLOG.COMMENT_WALINE_SERVER_URL && BLOG.COMMENT_WALINE_RECENT && <aside className="rounded shadow overflow-hidden mb-6">
<h3 className="text-sm bg-gray-100 text-gray-700 dark:bg-hexo-black-gray dark:text-gray-200 py-3 px-4 dark:border-hexo-black-gray border-b">{locale.COMMON.RECENT_COMMENTS}</h3>
<div className="p-4">

View File

@@ -79,7 +79,7 @@ const SideAreaRight = (props) => {
</Card>
)}
{BLOG.COMMENT_WALINE_SERVER_URL && <Card>
{BLOG.COMMENT_WALINE_SERVER_URL && BLOG.COMMENT_WALINE_RECENT && <Card>
<div className="text-sm pb-1 px-2 flex flex-nowrap justify-between font-light dark:text-gray-200">
<div className="text-gray-600 dark:text-gray-200">
<i className="mr-2 fas fa-tag" />