使用 Hexo 的 Next 主题美化自己的博客

1、安装 Next

在你的博客的文件夹下,右键点击 Git Base Here,输入以下命令

1
$ git clone https://github.com/iissnan/hexo-theme-next themes/next

2、启动主题

在你的博客的文件夹下,打开配置文件 _config.yml,修改 theme:next

3、启动服务

1
$ hexo s

4、主题设定

主题配置文件中将 scheme: Muse 注释,将 scheme: Pisces 注释放开

5、语言设定

站点配置文件中设置 language: zh-Hans(简体中文)

6、菜单修改

主题配置文件中间 menu: tags: /tags/ || tags 的注释放开

新建tags的页面,命令如下:

1
$ hexo new page tags

source\tags\index.md 文件中添加 type: "tags",结果如下:

1
2
3
4
5
---
title: tags
date: 2018-05-30 17:18:36
type: "tags"
---

主题配置文件中间 menu: categories: /categories/ || th 的注释放开

新建categories的页面,命令如下:

1
$ hexo new page categories

source\tags\index.md 文件中添加 type: "categories",结果如下:

1
2
3
4
5
---
title: categories
date: 2018-05-30 17:20:36
type: "categories"
---

7、修改样式

我们修改样式最好不要修改源文件,在Next中为我们提供了修改样式的地方。
定制样式文件: next\source\css\_custom\custom.syl
定制变量文件: next\source\css\_variables\custom.syl
定制mixin的文件: next\source\css\_mixins\custom.syl

其他的配置可查看 Next官网,或者自己测试研究。