movq

Wherein I Move A Lot of Words Around

Hugo From Shortcuts

It took a little work, but I managed to get iA Writer, Working Copy, and Shortcuts to play nice and create a new Hugo post on mobile. I’d toyed with the idea of adopting dynamic APIs that mutated a checkout of the site and such but there was always some extra difficulty and the whole point of going static was to avoid that nonsense.

The short of it is:

  1. Ask for Text with “Post Title”
  2. Current Date
  3. Format Date (Current Date, ISO)
  4. Text (your stub post goes here, frontmatter and all)
  5. Replace “[^\w\s]+” with “-” in “[step 1]”
  6. Change “[step 5]” to “lowercase”
  7. Format “Current Date” as “yyyy-MM-dd”
  8. Set name of “[step 4]” to “[step 7]-[step 6].md”
  9. Save “[step 8]” to “[Working Copy path to content dir]”
  10. Open “Saved File” in “iA Writer”