Banner

Blogging on an iPad


I bought my first iPad in 2010, back at iPad 1 when it was first released. And I still have it and it still works… sort of.

I say sort of because it is stuck on iOS 5.5 and it very difficult finding any apps or games which work, other than the ones which are already on there.

It is amazing how far things have come since then, particularly in the web development space, where I spend most of my time. Web applications are very capable (as is the iPad browser), and iOS has come a long way allowing native applications to work together. And it is this working together which has enabled me to create a relatively smooth blog editing experience.

My site is hosted on Netlify and managed on GitHub, so the key ingredient was [Working Copy][wc], which is a fantastic Git client for iOS. Given a local copy of the repository, I can mount my content folder into [iA Writer][ia] which is a very pleasant Markdown focused text editor. There are other options for this part of the tool chain, but I’m hoping to take advantage of the custom templates feature to get a realistic preview of the articles.

On my MacBook, the hardest part at this point was if I wanted to use a photo for a banner on the article. A hero image if you will. Lately I’ve been grabbing an image from Unsplash and uploading it my image host, but then I realized I can just reference it directly. So I have the [Unsplash][us] app which I can use to search for a photo, then I can Share the photo to a script that I wrote in [Scriptable][sc]. This script hits the Unsplash API to grab some details for adding attribution and sets a Markdown image snippet on the clipboard. Then I just need to paste this at the top of my file in iA Writer. It may even be possible to run a script on drag and drop if I had the apps running side by side. I’ll have to look into that.

The other pain I had was creating the front matter, that is to say, the metadata for the article. Yes it was possible to use Hugo’s archetypes or various other templating mechanisms, but I always found myself falling back to copy and pasting an older article. I didn’t want that here. Since the front matter for my posts is fairly consistent, I was able to create another Scriptable script to convert a basic Markdown document with a standard title and a custom format for categories and tags like this:

# My title

@category tag1 tag2

Content here.

Into a format that [Hugo][hu], my site generator, likes:

Written by Colin Bate
Francois Hoang