Microblogging with Pelican

I've previously posted some micro posts here, but recently mentioned that I'd created a separate WordPress blog for my micro posts at snippets.bellebcooper.com. I did this in order to create micro posts through the iOS and Mac Micro.blog apps, which can post to Micro.blog hosted blogs or WordPress blogs.

I loved the convenience of being able to post to my microblog from anywhere, but one of the main reasons for Micro.blog to exist is so you can control and own your content, while still reaping the benefits of social interactions around that content.

But my WordPress microblog felt like it only existed for the sake of Micro.blog, and although I owned the content, I didn't have a local markdown file copy with all my other posts, like I do for my normal blog, which is a static site created with Pelican.

I also felt a bit jealous when I read other people's micro posts on their own blogs in-between longer posts. I wanted to have all my posts in one place again, and have Micro.blog feel like an added extra, rather than the reason for my extra microblog to exist.

To post to my normal blog with Pelican, I have to create a Markdown file with the right metadata, then run Pelican commands on my computer to create and upload my blog. To make it easier to create posts when I'm away from my computer, I use a Dropbox folder for storing my Pelican Markdown files, and I set up three workflows in the iOS Workflow app. Here's how they work:

To create a micro post

  1. The workflow creates a text template of the metadata required, using an empty title field (which makes it render as a micropost) and today's date for the slug and date
  2. It asks me for input for the actual content
  3. It saves the file to my pelican/content folder in Dropbox

Workflow for creating a micro post

To create a photo post

  1. I edit the photo in the Photos app (I need to add a step here to compress the image eventually, as they're way too big coming directly from my phone's camera)
  2. I share the image to my Workflow action extension
  3. The workflow uploads the photo to my pelican/content/images folder in Dropbox
  4. It creates text using a template of metadata, with category of "photos" and Markdown image formatting using the name of the file it created in previous step
  5. It asks me for input, so I can add a comment about the photo
  6. It saves the file to pelican/content in Dropbox

Workflow for posting a photo

To share a link with quote

  1. I copy the text I want to quote while reading in Safari
  2. I share the link from Safari to my Workflow action extension
  3. The workflow creates text from a template of metadata, puts the link being shared into Markdown link format, and pastes the clipboard contents (the quote I want to share) into the template after > to make it a blockquote in Markdown
  4. It asks me for input, so I can add a comment about the link/quote
  5. It saves the text file to pelican/content in Dropbox

Workflow for sharing a link with quote

Next time I'm at my computer, after running any of these workflows, I just need to run the three commands that create and upload my Pelican blog, and the new files will be turned into new posts.

With this approach, I can't publish to my blog from anywhere but my computer. But I think that might be okay. I'm not sure why I ever need to publish a thought immediately to my blog. If I care enough about the thought to share it on my blog, I'll care about it later that same day, or tomorrow, or whenever I get to my computer to publish it.

What I can do is quickly create short posts to share thoughts, photos, and links to my blog. Being able to create when the mood strikes is more important to me than being able to publish immediately.

If you're also on Micro.blog, you can find/follow/chat to me at micro.blog/belle.