hexo-yilia
1.下载 yilia
1 | cd /opt/blog/themes |
2.修改 theme 为 yilia
进入 hexo 根目录
vi _config.yml
1 | 73 # Extensions |
3.修改头像
进入 yilia 目录
1 | mac126deMacBook-Air:yilia macwz$ pwd |
vi _config.yml
1 | 70 #你的头像url |
4.友情链接、关于我
yilia 目录 _config.yml 「同上」
1 | friends: |
5.左侧显示总文章数、总字数
修改 themes/yilia/layout/_partial/left-col.ejs
1 | <nav class="header-nav"> |
//同级下面新增
1 | <nav style="margin-top: 80px; font-size: 13px; color: #4d4d4d;"> |
6.文章字数统计和阅读时长
- 安装插件
1
npm i --save hexo-wordcount
- 编辑 themes/yilia/layout/_partial/article.ejs, 在header下面加入
1
2
3
4
5
6
7
8
9<header class="article-header">
<%- partial('post/title', {class_name: 'article-title'}) %>
<% if (!post.noDate){ %>
<%- partial('post/date', {class_name: 'archive-article-date', date_format: null}) %>
<% } %>
</header>
<div align="center" style="font-size: 12px; color: #1a5f14;">
字数:<%= wordcount(post.content) %>字 | 阅读本文大概需要 :<%= min2read(post.content) %>分钟
</div>
去掉代码块中行号
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 王文哲的博客!