Blogging with Obsidian and Hugo
Obsidian is a wonderful note taking software, it’s fast and most importantly works with vim bindings which lets me move around and edit text all without using a mouse.
Getting my writing online has been a bit of a challenge because I don’t really want to use interfaces like Wordpress’ or Substacks nor do I want to edit files in a code editor. I’ve solved this by using Obsidian as my backend for my blog. I’ve chosen Hugo as my blogging framework but any static site generator that uses markdown will work.
Static site generators usually have a folder where all the markdown files live, this is how Hugo does it:
content
├── article-1.md
└── article-2.md
So Obsidian also has a folder where all the markdown files are called ‘vaults’:
my-vault
├── essay-1.md
└── todo.md
What if we could put the blogs content
folder in the vault so we can edit the contents from Obsidian? We can with a symlink:
$ ln -s ~/my-blog/content/ ~/my-vault/blog
N.B. Remember the slash at the end of your blog’s directory in the command above.
So your Obsidian folder structure should look like this:
my-vault
| |── essay-1.md
| └── todo.md
└── blog
├── article-1.md
└── article-2.md
Try opening the blog’s contents in Obsidian.
[ Coming soon - writing a script to make publishing easier ]