Starting from version 2.0.0, it is possible to update a post that was previously composed and published via Micro.publish.

Before diving into the specifics of this feature, it’s important to mention a few design decisions that were made in order to implement this functionality.

Technical Details

Micro.blog conforms to the Micropub protocol, which outlines the procedures for publishing notes, uploading images, assigning categories, saving bookmarks, and updating posts.

When updating a post, the protocol requires the inclusion of the following information:

  • The original post’s URL.
  • The blogID, especially relevant for users managing multiple blogs.
  • The updated content and/or title of the post.

Obsidian offers plugins developers the option to locally store data within the vault. However, this capability is limited and necessitates custom implementation. For this reason, it was decided to store the published post’s URL within the Obsidian note itself using YAML frontmatter (and the new Properties feature). This approach ensures that the information remains readily accessible and easily modifiable if necessary.

Version 2.0.0

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:

Properties

And for those utilizing the Source mode, as YAML:

Frontmatter

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.

Review/Edit

Editing posts from previous versions

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:

Add Property

And add the url with the published post URL:

Properties

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.