hexo-next-blog简易搭建

环境配置(archlinux)

1
sudo pacman -S nodejs npm

hexo init在你想要创建的文件夹下初始化

npm install hexo-theme-next根目录下下载next主题

touch _config.next.yml 创建next的配置文件

cp node_modules/hexo-theme-next/_config.yml _config.next.yml 复制默认配置

修改_config.yml下的themenext

hexo clean清除缓存

主题配置

修改主题为scheme: Pisces

添加menu

1
2
3
4
5
6
menu:
home: / || fa fa-home
#about: /about/ || fa fa-user
tags: /tags/ || fa fa-tags
categories: /categories/ || fa fa-th
archives: /archives/ || fa fa-archive

配置分类

hexo new page categories

1
2
3
4
5
---
title: 文章分类
date: 2026-01-01 10:21:44
type: "categories"
---

文章头添加以分类

1
2
categories: 
- blog

配置标签

hexo new page tags

同样

1
2
3
4
5
---
title: 标签
date: 2026-01-01 10:21:44
type: "tags"
---

文章头添加以标签

1
2
3
tags:
- blog
- hexo

上传GitHub(由于以前有一个github page,可能步骤不全)

下载插件npm install hexo-deployer-git --save

编辑站点配置文件 _config.yml

1
2
3
4
deploy:
type: git
repo: https://github.com/l0fxxs/l0fxxs.github.io.git
branch: gh-pages

在设置中修改page为静态构建,重新发布page就行

注意文章头最好有摘要,这样首页不会展示全文
例如

1
description: "hexo-next-blog环境搭建,github page部署"