Logo Cinquin Andy Signature

Developing a Plugin for Obsidian: Useful Resources and Tips

Développeur Freelance - Logo

Developing a Plugin for Obsidian: Useful Resources and Tips

Posted on April 3, 2024 -  by Andy Cinquin

ObsidianPluginDevelopmentResourcesNotesProductivityWorkflowOptimization

In this article, we'll look at how I came to develop a plugin for Obsidian, and I'll share some useful resources I came across while developing this plugin.
First of all, what is Obsidian? It's a tool that lets you take notes (a bit like Notion or OneNote), but with a system of connections between notes. For example, if you're talking about a car, you can link to a sheet explaining what wheels are.
Obsidian is often used as a second brain (GTD principles, Zettelkasten, etc.). In short, a great personal development tool!
Personally, I use it daily. Now, I write my articles, I keep interesting tools, I explore new technos; in short, it's my Wikipedia and my personal sandbox!
Okay, now that we know what we're talking about, why make a plugin on Obsidian and how? For my part, I write my articles on this tool, and I needed to be able to export my articles from my Obsidian notes directly as articles on my blog, which is managed on Strapi for that matter.
So, how does an Obsidian plugin work? Simple:
  • a main.js file
  • a manifest.json file
The technology, JavaScript, and the Obsidian library, which contains the various basic Obsidian functions for interacting with their software's internal API.
So the initial requirement was to go through the note, upload all the images to my S3 where I store my images, replace the image links with external links (links to my image API), then upload the article to Strapi.
After that, several improvements were necessary. When uploading, the image and context had to be passed to ChatGPT and GPT Vision, to analyze the image and context, and output an alternative text.
Then, using the same context, I had to fill in the various fields required to upload my article (description for Google, title, tags, etc.), following a JSON template provided in our plugin's settings, and the description of the same plugin.
I've also added the ability to add a custom prompt, its OpenAPI key, to add additional images, another alternative call (which I use for uploading a realization and not a blog post).
Screenshot of a text editor displaying a Markdown file named README.md with a checklist for a project roadmap related to exporting notes from Obsidian to Strapi CMS.
So, here's my project roadmap at the beginning.
Little tip: ctrl + shift + i to access the debugging console in Obsidian (it's an embedded browser, in Chromium, so it's the same debugging tool as Chrome!).
Obsidian hot-reload plugin:(GitHub - pjeby/hot-reload: Automatically reload Obsidian plugins in development when their files are changed) to make it more pleasant to develop on Obsidian.
Base template: GitHub - obsidianmd/obsidian-sample-plugin, a default plugin so you can have an example.
Obsidian developer documentation: Home - Developer Documentation
The plugin I developed and published on NPM:
Webpage screenshot of the Strapi Exporter software plugin for exporting notes from Obsidian to Strapi CMS. Features include AI-powered image handling and SEO optimization.
Frankly, it's a bit scary at first, but it's really easy to develop in the Obsidian environment and add plugins for just about anything and everything. In short, I now have my own plugin to automatically add my articles to my website!



Thank you for your visit, feel free to contact me for any information, quote or collaboration proposal. I will be happy to answer you as soon as possible.
Did you like this article? Feel free to share it!

DEVELOP YOUR PROJECTS TOGETHER

An idea, a project? I'm here to answer your questions and help you.
I'd be delighted to discuss your project with you!