1.安装 hexo-wordcount
在博客目录下打开Git Bash Here 输入命令
npm i –save hexo-wordcount
2.文件配置
在theme\yilia\layout\_partial\post
下创建word.ejs
文件:
1 | <div style="margin-top:10px;"> |
然后在 themes/yilia/layout/_partial/article.ejs
中添加
1 | <div class="article-inner"> |
3. 开启功能
在站点的_config.yml
中添加下面代码
1 | # 是否开启字数统计 |
ps:原创文章,转载请注明出处