hexo-fluid blog

HEXO博客目录

你的博客目录为:

1
myblog/

打开看到:

1
2
3
4
5
6
7
_config.yml
package.json
scaffolds/
source/
themes/
node_modules/
.gitignore
1._config.yml ( Hexo主配置文件 )

作用: ( 用来控制Hexo本身 )

  • 标题
  • 语言
  • 主题名称
  • 部署到github pages的配置
  • 站点URL
  • 生成规则,分页

例如:

1
2
3
4
5
6
title: My Blog
theme: fluid
url: https://xxx.github.io
deploy:
type: git
repo: https://github.com/xxx/xxx.github.io.git

Hexo的配置在 _config.yml
主题的配置在 themes/fluid/_config.yml

2.package.json ( npm项目说明)

Hexo本质是一个Node.js项目

这个文件定义:

  • Hexo的依赖包
  • 版本
  • 插件
  • npm脚本(可选)

一般不需要修改,系统用来识别blog项目

例如:

1
2
3
4
"dependencies": {
"hexo": "^7.0.0",
"hexo-deployer-git": "^3.0.0"
}
3. source/

Hexo的所有内容来源

1
2
3
4
5
6
source/
├─ _posts/
├─ img/
├─ about/
├─ categories/
└─ tags/

_posts/

博客文章

1
2
source/_posts/esp32.md
source/_posts/anime-life.md

img/:图片

自定义界面:

/about/

/categories/

/tags/

/links/

运行

1
2
3
hexo new page about
# 生成
# source/about/index.md
4. themes/(主题核心)

Fluid主题所在处

1
2
3
4
5
6
7
themes/fluid/
├─ _config.yml
├─ layout/
├─ source/
├─ scripts/
├─ languages/
└─ ...

主要控制外观, ui, 功能

themes/fluid/_config.yml(主题配置)

控制: 外观, 样式和功能

themes/fluid/layout/(模板)

一般不重要, 是html模板

5.public/(生成静态网站)

可以看到

1
2
3
4
5
public/
├─ index.html
├─ archives/
├─ img/
└─ css/

不要修改,每次hexo generate 都会被覆盖

6. node_modules/(依赖)

不要修改, 如果失灵

1
npm install
7.scaffolds/(文章模板)

当运行

1
hexo new "My Post"

生成文章头的yaml

1
2
3
4
---
title: My Post
date: xxxx
---
8. gitignore(git 忽略列表)

确保git不上传的部分

例如:

  • node_modules
  • public
  • scaffolds

hexo-fluid blog
https://rubbishbro.github.io/2025/11/20/hexo-fluid-blog/
Author
John Doe
Posted on
November 20, 2025
Licensed under