Using Obsidian with 11ty

I do most of my writing in Obsidian.

Scratch that: I do all of my writing in Obsidian.

I’m obsessed with Obsidian. Most days I spend hours in the app, creating, editing, and tweaking. It’s a wonderful note-taking app, and I use it for everything from journaling to task management.

But I have a problem when it comes to workflow: I frequently find an easy way to do something, and use it for way longer than I should. I’m usually in a rush when trying to create a new workflow, because I want to get back to the work. But it leaves me in a situation where I use sub-optimal workflows for far too long.

Here’s how I used to publish to this blog:

  • Write the article in Obsidian
  • Open Sublime Text and my project for this blog
  • Clone an existing article, delete everything but the metadata
  • Tweak the metadata for the new article
  • Copy/paste the text into Sublime Text
  • Preview the site, look for typos
  • Publish

It’s not a bad workflow per se, but it could be a lot better.

And it turns out it was ridiculously easy to improve this. I saw someone (probably on TwitteX) who simply symlinked their static site folder into Obsidian. And it just worked.

So… I tried it. And it’s amazing.

There are a bunch of different ways to create symlinks, but the classic is this one-liner terminal command:

ln -s <path/to/your/static/folder> <path/to/obsidian/folder>

One of the nice things about this is you can create folders with two different names.

On this site most of the posts live in a “posts” folder. But when I created the symlink, I called it “TimDev” in Obsidian so I can find and search for it easily.

Then I created a template in Obsidian with the metadata I need for 11ty.

Those two simple changes eliminated so much friction for me. Now my publishing process looks like this:

  • Write something in Obsidian
  • Apply my static site template for metadata
  • Tweak the metadata as needed
  • Drag the note to my static site folder
  • Publish!

One of the best things about this is that my Obsidian tools now work for me on this site. I use the Obsidian Linter plugin, and once I symlinked that folder into Obsidian, Linter started automatically working anytime I edited one of my previous articles. Nice!

So if you too have a static site and you’re not sure how to integrate it into Obsidian, look no further: symlinks rock.

← Home

Changelog
  • Formatting fix
  • New article on Obsidian and 11ty