add wordcount, time to read
This commit is contained in:
parent
85b9f5769c
commit
438c484d77
12
README.md
12
README.md
|
@ -67,12 +67,12 @@
|
||||||
- [x] 页面滚动百分比提示。
|
- [x] 页面滚动百分比提示。
|
||||||
- [x] 一键快速回到顶部。
|
- [x] 一键快速回到顶部。
|
||||||
- [x] 无 jQuery,代码精简。
|
- [x] 无 jQuery,代码精简。
|
||||||
|
- [x] 文章字数统计
|
||||||
|
- [x] 文章阅读时长
|
||||||
|
|
||||||
### Unfinished 未完成
|
### Unfinished 未完成
|
||||||
|
|
||||||
- [ ] 文章版权信息
|
- [ ] 文章版权信息
|
||||||
- [ ] 文章字数统计
|
|
||||||
- [ ] 文章阅读时长
|
|
||||||
- [ ] 文章支持显示公式
|
- [ ] 文章支持显示公式
|
||||||
- [ ] 在线更改字体和字号
|
- [ ] 在线更改字体和字号
|
||||||
- [ ] 打赏功能
|
- [ ] 打赏功能
|
||||||
|
@ -237,6 +237,14 @@ magic:
|
||||||
enable: false # 是否显示侧边栏
|
enable: false # 是否显示侧边栏
|
||||||
fixed: true # 侧边栏是否固定
|
fixed: true # 侧边栏是否固定
|
||||||
position: right # 侧边栏位置 values: left | right
|
position: right # 侧边栏位置 values: left | right
|
||||||
|
|
||||||
|
# 文章字数统计、阅读时长
|
||||||
|
# 需要安装 https://github.com/willin/hexo-wordcount
|
||||||
|
# npm i --save hexo-wordcount
|
||||||
|
post_wordcount:
|
||||||
|
wordcount: true # 字数统计
|
||||||
|
min2read: true # 阅读时长
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Comment 评论
|
### Comment 评论
|
||||||
|
|
|
@ -99,3 +99,9 @@ magic:
|
||||||
enable: false
|
enable: false
|
||||||
fixed: true
|
fixed: true
|
||||||
position: right # values: left | right
|
position: right # values: left | right
|
||||||
|
|
||||||
|
# Post wordcount display settings
|
||||||
|
# Dependencies: https://github.com/willin/hexo-wordcount
|
||||||
|
post_wordcount:
|
||||||
|
wordcount: true # word count, one article
|
||||||
|
min2read: true # time to read, one article
|
|
@ -23,3 +23,5 @@ site_pv: PV
|
||||||
links: Links
|
links: Links
|
||||||
top: TOP
|
top: TOP
|
||||||
read_more: Read more
|
read_more: Read more
|
||||||
|
wordcount: Words
|
||||||
|
min2read: Mins
|
|
@ -23,3 +23,5 @@ site_pv: 总访问量
|
||||||
links: 友链
|
links: 友链
|
||||||
top: 顶置
|
top: 顶置
|
||||||
read_more: 阅读全文
|
read_more: 阅读全文
|
||||||
|
wordcount: 字
|
||||||
|
min2read: 分钟
|
|
@ -31,4 +31,14 @@
|
||||||
<i class="fa fa-eye"></i> <span id="busuanzi_value_page_pv"></span>
|
<i class="fa fa-eye"></i> <span id="busuanzi_value_page_pv"></span>
|
||||||
</span>
|
</span>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% if(theme.post_wordcount.wordcount){ %>
|
||||||
|
<span class="post-count article-wc article-meta-item">
|
||||||
|
<i class="fa fa-book"></i> <span ><%= wordcount(page.content) %> <%- __('wordcount') %></span>
|
||||||
|
</span>
|
||||||
|
<% } %>
|
||||||
|
<% if(theme.post_wordcount.min2read){ %>
|
||||||
|
<span class="post-count article-mr article-meta-item">
|
||||||
|
<i class="fa fa-clock-o"></i> <span ><%= min2read(page.content) %> <%- __('min2read') %></span>
|
||||||
|
</span>
|
||||||
|
<% } %>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue