diff --git a/includes/specs/plugins.spec.js b/includes/specs/plugins.spec.js index 2b13c0f..0ee616e 100644 --- a/includes/specs/plugins.spec.js +++ b/includes/specs/plugins.spec.js @@ -65,9 +65,9 @@ module.exports = { [doc]: 'Show the copy button in the highlighted code area', [defaultValue]: true }, - visit: { + busuanzi: { [type]: 'boolean', - [doc]: 'Show PV/UV of blog and PV of each article', + [doc]: 'BuSuanZi site/page view counter\nhttps://busuanzi.ibruce.info', [defaultValue]: false } }; \ No newline at end of file diff --git a/languages/en.yml b/languages/en.yml index 816fe2c..2e064eb 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -33,6 +33,8 @@ donate: patreon: 'Patreon' plugin: backtotop: 'Back to Top' + visit: '%s visits' + visitor: 'Visited by %s users' search: search: 'Search' hint: 'Type something...' diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index 5ca1fc7..7c0846c 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -31,6 +31,8 @@ donate: wechat: '微信' plugin: backtotop: '回到顶端' + visit: '%s次访问' + visitor: '共%s个访客' search: search: '搜索' hint: '想要查找什么...' diff --git a/layout/common/article.ejs b/layout/common/article.ejs index 7eadebb..25bb997 100644 --- a/layout/common/article.ejs +++ b/layout/common/article.ejs @@ -28,6 +28,12 @@ <%= `${ time.locale(get_config('language', 'en')).humanize() } ${ __('article.read')} (${ __('article.about') } ${ words } ${ __('article.words') })` %> <% } %> + <% if (!index && (has_config('plugins.busuanzi') ? get_config('plugins.busuanzi') : false)) { %> + + + <%- _p('plugin.visit', '0') %> + + <% } %> <% } %> @@ -41,17 +47,6 @@
- - UV:0, - - - PV:0 - -
+ <% if (has_config('plugins.busuanzi') ? get_config('plugins.busuanzi') : false) { %> +