原先的主题 hexo-theme-snippet ,更换的原因1)有点丑。2)加载图片非常卡。现在的主题 material-x ,非常简单,也不用什么图片,访问速度快,看着比较舒服,目前看是OK的。

安装material-x

1
2
3
4
5
6
# 1、下载主题
git clone https://github.com/xaoxuu/hexo-theme-material-x themes/material-x
# 2、然后安装必要的依赖包
npm i -S hexo-generator-search hexo-generator-json-content hexo-renderer-less
# 3、在博客配置文件中将主题修改为MaterialX 根目录下 _config.yml
themes: material-x

遇到的坑

1、增加简介

1
<!-- more --> 就是文章都要写个介绍,不然他会整篇文章显示出来很丑。

2、leancloud评论的

1
2
3
4
# 需要把key 改到 根目录下 _config.yml
leancloud:
app_id: xxxx
app_key: xxxx

3、独立页面

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
关于页面 source/about/index.md
分类页面 source/categories/index.md
标签页面 source/tags/index.md
列表页面 source/mylist/index.md
.
.
.
## 都要自己在source 下面创建相应的目录
## 然后在去修改主题下面的配置文件
- name: 分类
icon: fas fa-code-branch
url: categories/
- name: 友链
icon: fas fa-link
url: friends/
rel: nofollow

目前遇到这些坑,还有很多细节要调整,记录下20190914,更换博客主题。