Publishing from Obsidian using 11ty

I have been a long-time user of Obsidian for taking notes, mostly for writing my daily journals. And I have been using the tool for several years now, it’s fantastic and better than all other note-taking tools I have ever used.

Today, as I was writing my daily journal, I got a thought what if there’s a way to quickly publish all my writings as blog posts? And I quickly started an experiment.

Since I am already familiar with the 11ty (Eleventy) static site generator, I set up a blog by using a minimal CSS framework called PicoCSS. And as I wanted a clean look, I didn’t use any pre-built themes or starter projects – did everything from scratch. After the project was set up, I opened the same folder as a new vault from my Obsidian desktop app, and it turned out, that I can successfully create new posts from Obsidian now, without the need to open my 11ty code folder.

I have even recorded a quick video explaining things:

https://www.youtube.com/watch?v=vHKuy7BqMMM

To enhance the functionalities, I did the following things as well:

  • Set up the default location for new notes so that all notes I take get saved to the same folder. It will be easier to publish later.
  • Created an Obsidian template that automatically adds all the required front matter in new posts being created.
  • Installed the git plugin inside Obsidian so that it automatically keeps pushing new changes to GitHub at a specified interval.
git-plugin

I have made the GitHub repo public, in case you want to access the source code that I was showing in the video above. And you can check the sample site as well:

I spent only a few hours working on it, but there can be several further enhancements made to the publishing flow. For example, the way to add internal links and images can be improved.

I hope this gives you at least some idea to experiment further.


Recent Posts

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *