如何深度优化Hexo

将Hexo变得更加优美

本篇博文长期维护,如果找到了新的优化马上会放上来啦

本文基于NexT主题测试有效,不保证其它主题的可用性

在NexT主题里,custom.styl才是最好用的工具啊!

站点标题自定义

默认的样子太丑?把想法写在custom.styl里面!

~/.../themes/next/source/css/_custom/custom.styl
1
2
3
4
5
6
7
8
.site-title {
font-family: ???;
font-size: ???px;
font-weight: ???;
color: rgb(???, ???, ???);
line-height: ???px;
letter-spacing: ???px;
}

都是字面意思,实在不懂的 $hexo\,\,s$ 一下看看效果

主题自带样式note标签

这里选择的是最简单的方式,不会有奇怪的显示bug

default

1
<div class="note default"><p>default</p></div>

primary

1
<div class="note primary"><p>primary</p></div>

success

1
<div class="note success"><p>success</p></div>

info

1
<div class="note info"><p>info</p></div>

warning

1
<div class="note warning"><p>warning</p></div>

danger

1
<div class="note danger"><p>danger</p></div>

danger no-icon

1
<div class="note danger no-icon"><p>danger no-icon</p></div>
Helping poor children in CSSYZ!!!