提交 8930455a 编写于 作者: EvanOne(文一)'s avatar EvanOne(文一)

feat: Add busuanzi count

上级 5236ed3d
......@@ -281,6 +281,27 @@ gitment:
# Enable / Disable Lazy load. Enable is recommended.
lazy: true
# ---------------------------------------------------------------
# Statistics and Analytics config
# ---------------------------------------------------------------
busuanzi:
enable: true
# Number of unique visitor to the entire site.
site_uv:
enable: true
# Icon name in FontAwesome, see: https://fontawesome.com/icons
icon: user
# Number of page view to the entire site.
site_pv:
enable: true
# Icon name in FontAwesome, see: https://fontawesome.com/icons
icon: eye
# Number of page view to a post.
post_pv:
enable: true
# Icon name in FontAwesome, see: https://fontawesome.com/icons
icon: eye
# ---------------------------------------------------------------
# Other config
# ---------------------------------------------------------------
......
......@@ -46,6 +46,8 @@ footer#footer
if footer.theme.version
span= ' v' + stun_env('version') + '.'
include ../_third-party/analytics/analytics-widget.pug
if footer.custom.enable
div
span!= footer.custom.text
......@@ -39,8 +39,9 @@ mixin postHeader(post)
span= _p('post.word_count') + ' '
span TODO
span.post-meta-read
i(class='fa fa-eye')
if !theme.post_meta.icon_only
span= _p('post.read_count') + ' '
span TODO
if theme.busuanzi.post_pv.enable
span.post-meta-read
i(class=`fa fa-${theme.busuanzi.post_pv.icon}`)
if !theme.post_meta.icon_only
span= _p('post.read_count') + ' '
span(id="busuanzi_value_page_pv")
if theme.busuanzi.enable
div.busuanzi
script(async src="https://cdn.jsdelivr.net/gh/sukkaw/busuanzi@2.3/bsz.pure.mini.js")
if theme.busuanzi.site_uv.enable
span.busuanzi-uv
i(class="fa fa-user")
span(id="busuanzi_value_site_uv")
if theme.busuanzi.site_uv.enable && theme.busuanzi.site_pv.enable
span.separator |
if theme.busuanzi.site_pv.enable
span.busuanzi-pv
i(class="fa fa-eye")
span(id="busuanzi_value_site_pv")
.busuanzi
.separator
margin: 0 .3rem
&-uv
color: $white-light
i
margin: 0 .3rem 0 0
&-pv
color: $white-light
i
margin: 0 .3rem 0 0
@import './analytics.styl'
// third-party
@import 'nib'
@import './_third-party/normalize.min.css'
// project
@import './var.styl'
@import './_global'
@import './_components'
@import './_mixins'
@import './_layout'
@import './_common'
@import './_components'
@import './_highlight'
@import './_third-party'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册