Publishing posts on iOS with Apple Shortcuts

May 6, 2024

Driven by my need (read: want) to post on the go to my website I started looking into ways to "fire and forget" to my thoughts.

I hit on a great post by Simone Silvestroni (Minutes to Midnight) who documents how he uses Apple Shortcuts on macOS to publish via Jekyll. He also goes into how to automate image optimisation but I haven't got that far yet.

While Simone's focus was on macOS, Apple Shortcuts are on iOS as well, so in theory this could work for iOS as well!

The approach

I self-host my website and the repository that it's built from but this should work just as well for Netlify or GitHub Actions.

The main automation you need is to be able to update your repository. As long as you have the relevant triggers to rebuild your website you're good to go!

For me with my self-hosted approach I needed to:

  1. (Phone) Create an iOS Shortcut to add title & content
  2. (Phone) Commit & push this change to my website repository
  3. (Home Server/Cloud) Have a webhook trigger on push to master to rebuild my website
  4. (Home Server/Cloud) Drop the new website in the relevant folder to serve from

iOS doesn't have a git client out of the box but there is the excellent Working Copy that has a plethora of Shortcuts integrations.

If you want to get the Shortcut then click here.

I may do a video demonstrating how to set this up in future. If that is of interest, let me know!