hexo+fluid主题配置

Fluid主题配置的一些简单使用。

1. 主题下载和配置

选择自己喜欢的主题:https://hexo.io/themes/

Fluid主题: https://github.com/fluid-dev/hexo-theme-fluid

选择Fluid主题主要原因:

  • 详细的用户文档
  • 多种代码高亮方案
  • 支持 LaTeX 数学公式
  • 支持 mermaid 流程图

2. hexo指令

新建文章

执行后,会在 source/_posts/ 目录下生成一个 文章标题.md 文件,可以直接去该目录下编辑这个 Markdown 文件。

1
hexo n "文章标题" # hexo new 简写

日常写作

主要原理:hexo generate 指令将Markdown文件 和主题配置编译成 HTML 网页,存放在 public 目录下,hexo deploy指令将 public 目录下的内容推送到远程仓库。

1
2
3
4
5
6
7
hexo clean  # 清理缓存
hexo g # hexo generate简写,生成静态文件
hexo s # hexo server简写,本地预览
hexo d # hexo deploy简写,部署到服务器

# 清理 + 生成 + 部署
hexo clean && hexo g && hexo d

3. 页面美化

配置指南: https://hexo.fluid-dev.com/docs/guide/

评论插件推荐:https://giscus.app/zh-CN

数学公式推荐:KaTeX (渲染速度较快)

Mermaid 流程图配置

1
2
3
4
5
6
post:
mermaid:
enable: true
# 开启后,只有在文章 Front-matter 里指定 `mermaid: true` 才会在文章页启动公式转换,以便在页面不包含公式时提高加载速度
specific: true
options: { theme: 'default' }

hexo+fluid主题配置
http://example.com/2025/12/07/hexo+fluid主题配置/
作者
EthanYLiang
发布于
2025年12月7日
更新于
2025年12月7日
许可协议