🏡 Go Home My GitHub My Twitter My Discord Email Me

← Go Back

Integrating Obsidian into my blog

May 25th 2021, 12:12 PM (UTC)

Finding Obsidian

This week, at work I was listening to the latest episode of connected, and I heard Federico Viticci talking about Obsidian. The thing that intrigued me the most about it was the ability to write custom plugins. I love being able to make little changes to the services that I use, so this really sparked my interest.

Finding my idea

I needed an idea to get into Obsidian, so I decided I would integrate it into my blogging platform. At first, I thought I could directly integrate it by just editing Quill to support reading from Markdown files, but I decided against that. Mostly because that would require me to rethink a big chunk of how it works. After some thinking, I decided it would be best if I created a custom plugin that allows me to upload my current Obsidian note right onto the blog.


I spent most of the morning looking at the sample project for Obsidian Plugins. This is a perfect example of what a sample project should be. It shows off what seems to be every feature of the Obsidian API that someone jumping into making plugins needs.

After I got the sample project downloaded and running using NPM I started developing. Since my idea is super simple it was actually fairly easy to implement, the hardest part was dealing with CORS, but once I figured out I can just place mode: "no-cors" into my fetch call everything was fixed. Once the Obsidian plugin was written I spent some time tweaking Quill, fixing bugs that popped up while doing this much work with it.

How does the plugin work?

The plugin takes the current file's text and then parses it to extract the title and the date. Once these are extracted a form is constructed and then sent as a POST request to the Quill API. Then, Quill does its magic and the post is uploaded. It is not much different from when I would just email Quill, but it does remove the need for a Zapier integration and allow me to publish right from my text editor.

Where Obsidian sits now

I so far i'm really liking Obsidian. I love the graph view, even though mine is not that impressive right now. It just really pleases me to see all of my notes connected in one giant graph. Other than that I am really liking the customizability and mod-ability of the entire platform. I do wish NPM packages worked better and there was more documentation on what parts of JavaScript just will not work. But besides that being able to just build features into the editor is exactly what I want. It is going to be awesome, and I can't wait to keep diving into it more.