优化个人github博客
前言
-
本篇文章是在已经搭建好gitpage+hexo的博客的前提下
-
不懂怎么搭建的可以参考上一篇<搭建个人博客>
-
大致效果如我的博客所示 https://moking1997.github.io/
-
我使用的是next主题,官网有简单的教程
-
最终效果如下:
下载next主题
- 在终端窗口下,定位到 Hexo 站点目录下。使用 Git checkout 代码:
cd your-hexo-site git clone https://github.com/iissnan/hexo-theme-next themes/next
- 注意我这里用的是克隆版本,之后的更新可以通过 git pull来快速更新
启用主题
-
与所有 Hexo 主题启用的模式一样。 当 克隆/下载 完成后,打开 站点配置文件, 找到theme字段,并将其值更改为 next
-
然后输入以下命令查看next主题效果
hexo clean
hexo g
hexo d
- 基本配置next官网都有教程,这里不过多讲述了
设置菜单子页
- 编辑next主题配置文件,修改以下内容:
menu:
home: /
archives: /archives
#about: /about
#categories: /categories
tags: /tags
#commonweal: /404.html
-
假设要添加categories页面,先将其前的#去掉
-
再在根目录通过hexo new page "categories"创建该文件夹