0%

安装和使用Hexo的主题 NexT

安装和使用Hexo的主题 NexT

Hexo 安装主题的方式非常简单,只需要将主题文件拷贝至站点目录的 themes 目录下, 然后修改下配置文件即可。

安装主题

1
2
3
$ cd taoyuyin.github.io
$ git clone https://github.com/theme-next/hexo-theme-next.git themes/next

启用主题

编辑 _config.yml

1
2
theme: next

配置主题

编辑 themes/next/_config.yml。注意这个是主题目录下的 _config.yml 文件。

1
2
3
4
5
6
scheme: Pisces

menu:
home: / || fa fa-home
about: /about/ || fa fa-user
archives: /archives/ || fa fa-archive

除了 archives 不需要创建目录,其他分类需要自己创建

1
$ hexo new page 'about' # 创建 about 对应目录和页面

预览发布

生成博客

1
2
$ hexo g
$ hexo s

本地预览 访问 http://localhost:4000

发布

1
$ hexo d