I wrote an Obsidian plugin named Micro.publish which I use to publish extended posts on my blog. This plugin is open source, and you can find its code on GitHub.
However, not everything I publish to Micro.blog is the in format of blog posts. I also publish content in pages, as some sort of Digital Garden. Given its small scale, I’ve called it “Kleingarten”.
Upon reviewing the API documentation, I couldn’t find the endpoint for creating and updating pages.
Could you direct me to the documentation? Furthermore, it appears that neither the Micro.blog app for macOS nor the one for iOS supports page creation. However, as MarsEdit has this capability, I presume there’s a dedicated endpoint for this purpose.
This is great material, thank you @sod. I’ll implement this using the Micropub method. I’ve tested it here, and to update a page, I don’t need to make any modifications to my code. I simply need to adjust the code to create the page. The only detail missing from the Micropub documentation is whether (or how) to include the page in the blog navigation. I’ll try to figure that out. Thanks again.
There’s no way with Micropub to set whether a new page appears in the navigation of your blog. It always defaults to including it. This is possible in the XML-RPC interface, though, with the is_navigation param.
We should add an option via Micropub. In the meantime, if you don’t mind working with XML, you can switch between both APIs. The authentication token used in Micropub also works as the “password” in XML-RPC.
Thank you for the detailed information on the Micropub and XML-RPC interfaces. After considering the options, I have decided to stick with the Micropub REST API for now.
To address the issue of new pages defaulting to the navigation bar, I’ll advise users to visit Micro.blog and manually remove the page from the navigation if they so desire.
Furthermore, I’ll try to maintain consistency within the plugin. Mixing two different approaches could potentially introduce technical debt, especially given that this is a side project.
This looks great! I’m going to add an optional parameter (mp-navigation = true/false) so you have more control over this from Micropub. I’ll roll it out later this week.