Obsidian搭配Hexo思路

概述

Hexo + PicList +Obsidian实现在Obsidian中编写文章然后发布。
在Obsidian中,于_posts目录下新建目录作为分类,新建文章,编写完成后保存时可以填写标签等信息。通过PicList 和 Image auto upload (Obsidian)插件进行图片的上传。

Hexo插件

hexo-auto-category(日志的自动分类插件)

好处:通过文件夹的方式自动生成category。
安装:$ npm install hexo-auto-category --save
配置:在_config.yml文件中填写配置信息。

1
2
3
4
5
6
7
8
# Generate categories from directory-tree
# Dependencies: https://github.com/xu-song/hexo-auto-category
# depth: the max_depth of directory-tree you want to generate, should > 0
# multiple: multiple category hierarchies
auto_category:
 enable: true
 multiple: false
 depth: 1

如此,当部署时会根据内容所处_posts下的目录进行自动分类。

搭建图床

通过PicList(或PicGo) + GitHub搭建图床,用于将图片与笔记分开。
推荐使用PicList,方便删除云端图片。
注意若使用steam++时可能会导致上传或者删除失败。
image.png

Obsidian插件

Folder Focus Mode

用来聚焦到posts文件夹。

Linter

保存文件(Ctrl + s)时添加文件开头。

Image auto upload

填写相关配置,开启剪切板自动上传,搭配PicList,这样粘进来的图片会自动进行上传。

Shell commands

新建命令:hexo clean && hexo g -d用于部署
使用时通过快捷键Ctrl + p 调出命令面板,回车执行部署。
image.png

部分参考


Obsidian搭配Hexo思路
https://www.catparkgame.space/2025/09/03/技术/Obsidian搭配Hexo思路/
作者
wan
发布于
2025年9月3日
许可协议