Micro.publish is a community-maintained plugin for Obsidian that allows you to publish notes to a Micro.blog blog.
Does this plugin improve your workflow? If so, you can show your appreciation by buying me a coffee.
This community-maintained plugin is not affiliated with Micro.blog or Obsidian.
To install this plugin, open Obsidian and go to Settings > Community Plugins > Browse
. Search for Micro.publish
and click Install. Alternately, it can be installed directly from Obsidian's website.
After installation, you need to log in to a Micro.blog account with an App Token. You can create an App Token on the Micro.blog Account Page.
Users with multiple blogs can set a default blog, default categories, and default post visibility (draft or public). These settings can be overridden before publishing a note to Micro.blog.
The plugin has two commands that can be accessed through the Command Palette:
- Post to Micro.blog - This command publishes the selected note to Micro.blog.
- Synchronize Categories - This command fetches all the categories used in your blog from Micro.blog.
Tip: Micro.publish automatically fetches categories from Micro.blog whenever Obsidian is launched.
Before publishing a note to Micro.blog, Micro.publish opens a window that allows you to change the post title, tags, visibility, and data (for scheduling a post for a future date).
Micro.publish supports YAML frontmatter. It also works with the new Properties feature introduced in Obsidian 1.4, which is essentially a user-friendly interface for the less aesthetically pleasing YAML syntax.
- Micro.publish will use the
title
property in the frontmatter or Properties, if it exists. Otherwise, it will fall back to the filename. - Micro.publish will use the
tags
property in the frontmatter or Properties, if it exists. Otherwise, it will use the default categories configured in Micro.publish's preferences.
For posts published with version 2.0.0 or newer, the post's URL
will be added to the Markdown file in the YAML frontmatter/Property.
For those in Edit mode, it appears as a Property as shown below:
And for those utilizing the Source mode, as YAML:
Once the note or title has been edited (either through the filename or YAML/Property), updating is as simple as using the Post to Micro.blog command from the Command Palette. A simplified version of the Review view will appear, displaying the post's title. For users with multiple blogs, it will prompt them to confirm which blog the post belongs to.
It is also possible to update posts that were published using Micro.publish versions prior to 2.0.0. To do so, you must include a Property (or field in the YAML frontmatter) named url
containing the URL of the published post, as illustrated below.
To include a new Property, simply follow these steps in the Command Palette:
And add the url
with the published post URL:
Those who prefer the YAML file can add the the url
using the format:
---
url: https://example.com/path/to/post.html
---
After editing the note or title (either through the filename or YAML/Property), updating is as straightforward as utilizing the Post to Micro.blog command from the Command Palette. Similar to the process for version 2.0.0, a simplified version of the Review view will be presented, featuring the post's title. For users with multiple blogs, it will inquire about the blog to which the post should be associated.
Clone this repository inside the Obsidian Vault:
$ cd .obsidian/plugins/
$ git clone https://github.com/otaviocc/obsidian-microblog
Resolve the plugin dependencies and build it:
$ cd obsidian-microblog
$ npm i
$ npm run build
Restart Obsidian and enable the plugin from Community Plugins in Settings.
- Fork this repository and follow the steps from the previous section using the forked repository instead
- Create a feature branch for the changes
- Commit the changes and push them to the forked repository
- Submit a pull request