In reply to Publish Obsidian Documents to WordPress by Curtis McHale

I didn’t come across this posting at the time. As you say, having to log in every single time as well as having to send it already formatted raw HTML (and not the markdown one writes in in Obsidian), are drawbacks. XMLRPC is blocked by my hoster (part of their security decisions), and I have disabled it within WP therefore. I went with Micropub to publish from Obsidian to WordPress, around the same time as this posting. As notes in Obsidian are plain text files in the local filesystem, I run a local script outside Obsidian periodically checking for files marked for publishing. Using Micropub it can post such files, while turning markdown into html, to several of my WP-run sites, both as post and as a page. The latter allows me to add them to my wiki-like section of my blog. Just posting at the moment though, not updating.

To publish click the WordPress icon in your sidebar which will reveal a panel in the sidebar with a Publish button for you to click. Once you click the Publish button a window opens up with your username prefilled and asks you to fill in your password. The plugin … publishes RAW HTML on your site. … While this does work, it feels far from optimal to me. I’d love to see the option of pushing straight markdown to the editor.

Curtis McHale

Dave Winer asks for two-way RSS. He says publishing platforms usually do provide feeds for readers, but writers usually have to use the platform itself. This while Dave, and I presume many other writers, as well as me, do their writing preferrably outside the place where we publish. Dave suggests for platforms to be able to import feeds, not just generate them. That way there is no need to use the platform’s back-end.

I am not sure if RSS is the most flexible solution, although it is entirely possible. In fact, I publish on micro.blog/ton by sending an RSS feed from this site to Microblog. Currently it’s the main feed of this site, but it used to be a different one, and it could be a fully separate one. If your own writing tools are already good at generating RSS feeds from what your write there, then sure using that is fine. Like on Microblog, all it takes is to log into the publishing platform and add the feed URL in your settings. This works well in a one-to-one setting, connecting a writing tool to a publishing platform.

Another option is using Micropub. It’s a bit more complicated to initiate, as it requires a workflow authenticating oneself to the platform, and in 2 steps obtain a token to be authorised to send content to the publishing platform’s micropub endpoint. But once you’ve done that, you’re basically talking to an API. This allows not only creating, but also updating or deleting earlier posts. It also supports uploading media to the publishing platform itself and manipulate it there, thus allowing media to be hosted with the publisher as well.

This is what I do mostly these days. I write in my own writing tool (Obsidian currently), and run a script that looks up the items ready to publish and pushes them one by one to one or more of 4 sites. I use the same solution to also directly post from my feed reader, and using a simple form for the most basic of posts. I imagine in Dave’s use case that would entail multiple feeds to have the publishing platform subscribe to, or merging multiple streams first into a single RSS feed.

The web wasn’t intended as a reading only space, but as a read and write space. Whatever makes writing easier, whether it’s original texts, responses and dialogue, multi author edits, or annotations, is useful.

I extended the capabilities of my microsub feed reader with the option to save web articles directly from the reader to my Obsidian notes in markdown format.

Until now if I wanted to save an entire article I found in my feed reader, I would open it in the browser and then use the markdownclipper browser add-on to add some context and then save the article in markdown in my notes. I wanted to cut out that step of opening it in the feed reader, by saving it directly to my markdown notes. In my feedreader I already have a response form to e.g. post a reply to a posting on my own site. Posting it to my notes means adding a path to how I process that form.

I had to find a suitable script for converting HTML to MarkDown first. Which I found in PHP League’s HTML-to-Markdown, as suggested by Jan Boddez. It requires Composer which I already had installed on my laptop.

I tweaked my feed reader’s response form to also (as a hidden field) include the original HTML of a posting (using htmlentities to stuff it into a form field value). The script that processes the form I altered to both have a path for posting to websites (using micropub) and a new path to make a note in Obsidian, which is then saved as a .md file to the folder I store all clipped articles in.
To make a note I shape the available input the same way I template clipping things from the browser. At the top is my rationale for clipping something and reference to the source, followed by the original posting after which I add some keywords as tags and again the reference to the source.

In the images below you see the corresponding elements marked both as they appear in the reader as well as the resulting note.

The article as shown in my feed reader:

1: the original HTML content from a feed
2: title of the article (prefilled by my feed reader)
3: name of the author (prefilled by my feed reader)
4: original article’s URL (prefilled by my feed reader)
5: the reason and context why I am saving this to notes (also used to write a reply to a post, or the reason for bookmarking something if it will be posted on my site)
6: a quote I want to highlight
7: keywords that will become tags or categories on my site, and tags in my notes
8: selector for which site to post to (zyl is my blog), or ‘obs’ for making a note in Obsidian

Except for that last one those numbers are marked on the image of the resulting markdown note.

The resulting note in Obsidian:

1: the original HTML content from a feed shown in Markdown as the main body of the note
2: title of the article, both shown as part of the content of the note, as well as the title of the note (where a timestamp is added)
3: name of the author (mentioned with the source both at the top and bottom)
4: original article’s URL (mentioned with the author both at the top and bottom)
5: the reason and context why I am saving this, always at the top as it helps me process the content better
6: a quote I wanted to highlight
7: keywords that have become hashtags

(This posting was also written in my notes and, except for the images, posted directly from Obsidian to my site. Meaning I can both automatically move material into Obsidian, as well as automatically move material out of Obsidian. I quite enjoy the feeling of using that ‘magic’.)

I can now create pages in WordPress using my personal Micropub client. This makes it possible for me to publish notes from my personal knowledge management system to my WordPress site as pages in the Digital Garden I keep there. Like this one as proof of concept.

In the past weeks I created a way to publish directly from my notes to my blog using Micropub. I also added a selector to choose to which site I want to publish to.
Now there’s an added option to create a page, and not just posts.

Until now I created those pages manually whenever I thought to document something publicly. The result of that is that creating a page involves a certain friction, and the number of pages has stayed very low as a result. I hope this step may make my pages section more useful in sharing documentation about e.g. concepts I find important or things I created.
Combined with the site selector this also means I can now easily add pages to my professional site, my company’s site and e.g. the IndieWebCamp.nl site.

(also posted to Indienews)

This page was created using my personal Micropub client. This allows me to post not only posts but also pages to my various WordPress websites. And to do so along several paths, such as directly from my local notes. This page is merely a proof of concept. My intention is to use this way of posting to better extend my publicly shared notes in my Digital Garden. For now it is just about creating new pages. A next step would be to also apply this to updating of pages.

This is a second POC attempt to directly post an Obsidian note to my website.

My script still merely grabs the filecontent and title from files created in Obsidian and saved in a predefined folder on my local system and sends it to my Micropub endpoint. But now it should also parse the content for Markdown and turn it into the HTML equivalent.

header 2

header 3

Bold text
Italic text

  • list item
  • another list item
    • indentend list item

Markdown link to my blog

What happens if I have a backticked block in my file

some nonsense here
$string = "stringtext";

As before nothing yet is done yet for tags, categories etc. This is just another attempt to see if the basic process can be made to work.


Screenshot of this posting as I wrote it in markdown in Obsidian