安装Next主题

很喜欢简洁朴素干净的next主题

适用于hexo 5.0以上版本

安装主题

有三种方式安装:下载源码、npm、git,推荐使用git方式

git方式

1
2
3
4
# 切换到博客站点根目录
cd hexo-site
# 安装next主题到themes文件夹内,并更名为next
git clone https://github.com/next-theme/hexo-theme-next themes/next

themes/next/_config.yml文件拷贝到博客站点根目录下,更名为_config.next.yml

站点配置(Hexo配置)

打开站点的_config.yml,找到Extensions块,修改主题为next

1
2
3
4
5
# Extensions(拓展)
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
# theme: landscape # 默认主题
theme: next

测试浏览

运行hexo s,浏览器http://localhost:4000查看是否生效


参考资料

更新日志

  • 2024-03-03:精简主题安装的操作