An Obsidian plugin that lets you create Hexo drafts and publish notes directly to your Hexo blog.
- Create Hexo Draft — Run the
Create New Hexo Postcommand, enter a title, and a Markdown file with pre-filled frontmatter (title,date,tags,categories,publish: false) is generated and opened automatically. - Publish to Hexo — Notes with
publish: truein frontmatter are synced to your Hexo site's_postsdirectory via thePublish Postscommand or the ribbon icon. - Image Handling — Obsidian-style image embeds (
![[image.png]]) are converted to standard Markdown () and copied to Hexo's/imagesdirectory. - Annotation Conversion — Obsidian footnote-style annotations (
^[comment]) are converted to HTML comments.
- Download
main.jsandmanifest.jsonfrom the latest release. - In your vault, create the folder
.obsidian/plugins/hexo-publisher/. - Place both files into that folder.
- Enable Hexo Publisher in Obsidian Settings > Community Plugins.
| Setting | Description | Default |
|---|---|---|
| Git Repo | Absolute path to your local Hexo site repository | — |
| Source Dir | Hexo source directory name | source |
| Default Draft Directory | Directory for new drafts, relative to vault root | (vault root) |
- Open the command palette and run Create New Hexo Post.
- Enter the post title and press Enter.
- A file named
YYYY-MM-DD-slug.mdis created in your draft directory and opened automatically.
- Add
publish: trueto a note's frontmatter. - Run the Publish Posts command or click the ribbon icon.
- The plugin writes converted Markdown and images to
{gitRepo}/{sourceDir}/_posts/and{gitRepo}/{sourceDir}/images/.
- Desktop version of Obsidian (not supported on mobile)
- A local Hexo site git repository