Publishing with iPad

My perpetual pattern for releasing a new website always goes something like this: I get excited about a new thing, I design and build the first version in one or two obsessive days, I publish an announcement post about how thrilled I am, I link the site on Twitter… and then I don’t post again for a year. I’m certainly not the only person who does this, but it frustrates the hell out of me how quickly I fell into the trap this time around.

My previous weblog used Tumblr for the last few years of its existence. The primary goal of starting this site was to focus on long-form writing and to strip away everything else. I decided to use a self-managed static-site generator called Hugo, which was easy to configure and does everything I need out of the box. While the process of creating new content and publishing it is straightforward, there’s certainly more to it now than when I was simply tapping a single button to create content on Tumblr.

The biggest downside to this new system was how it tied me to my Mac. I could write on the go (these posts are just Markdown, after all), but to preview, edit and publish content I needed to use my Mac. Perhaps it won’t surprise you to learn this new process quickly stalled my writing progress. I started draft after draft only to abandon them when I got busy or needed to step away from my desk for the weekend.

Deciding where to write

I spend at least 40 hours a week in my home office. I do all of my work there, stream keyboard builds to YouTube and play lots of console and PC games. While my primary Mac is a 15-inch MacBook Pro, it’s connected to two LG 5K displays and I rarely disconnect it and use it elsewhere1. I consider it a desktop computer (maybe one day Apple will finally release a new Mac Pro).

Truthfully, part of the reason I never take my MacBook Pro out of the office is the intense desire to separate my home life from my work life, something I have a very hard time with. A few years back I realized the only way to prevent myself from doing work after-hours is to remove access to the tools when the workday is over. You can’t open Xcode or Sketch if you don’t have a Mac nearby. Besides, my iPhone (especially larger-screened iPhones of recent years) does so much, I didn’t find myself needing a computer much for leisure. Responding to email, replying to chat messages, browsing Twitter and Reddit—iPhone excels at all of these tasks and it fits in my pocket with an all-day battery. Who needs to lug a 5-pound laptop around the house?

And while I enjoy browsing social media on my phone, and I take and edit lots of photographs there as well, writing long-form posts for this website isn’t exactly comfortable. As fast as I type on an iPhone keyboard, the idea of (accurately) typing thousands of words wasn’t particularly attractive. On top of that, while I love editing Instagram photos on my phone, I’ve got a backlog of hundreds of Leica Q photos I still want to edit–editing more involved than simply tweaking levels. Doing that type of work on my XS Max is certainly possible, but after reading all the reviews of the 2018 iPad Pro and how amazing its processor is, I started to consider how perhaps it was finally time to try making an iPad part of my away-from-the-desk computing life.

So, a few weeks later, I found myself with the new Apple Pencil and a 12-inch iPad Pro, very much enjoying editing photos in Lightroom CC on the couch. Being able to browse Reddit while still having Discord or Messages visible was very nice in the evenings compared to the constant app-switching required on my iPhone.

Once I got used to the flow of using my new iPad, it was time to remove my last excuse for not posting here and figure out how I could write, preview and publish all from my iPad, comfortably, anywhere.

Setting it up

The pre-requisite for getting this all going is installing and configuring Hugo (or, probably, many other similar static-site generators). You’re going to use a Mac as your server for this process, so first we’re going to need to configure SSH to securely connect from your iPad later.

  1. Open System Preferences on your Mac and go to the Sharing pane. Turn on Remote Login and switch access to “Only these users”, then remove everyone but your user account from the list. Take note of your IP address while you’re there, you’re going to need that later.

  2. We don’t want to use passwords for SSH, we want to use keys. Open Terminal and modify your SSH configuration to make this a requirement:

    sudo vi /etc/ssh/sshd_config

    You’re looking for “PasswordAuthentication” and “ChallengeResponseAuthentication”, both of which you want to have uncommented and set to “no”. When complete, you should see something like the following:

    # To disable tunneled clear text passwords, change to no here
    PasswordAuthentication no
    #PermitEmptyPasswords no
    
    # Change to no to disable s/key passwords
    ChallengeResponseAuthentication no

    Save the config. You don’t need to restart SSH.

  3. On your iPad, open Coda and in the Sites list, tap the Settings icon. Tap “Keys”, then the + button, then “Generate new key…”. Give it a nickname, set a passphrase, then choose RSA and 4,096. Now you have a key, and we need to configure your Mac to use it.

  4. Tap on the new key in the list and then on “Copy public key”. On your Mac (you do have Handoff enabled on your devices, right?), we’re going to add to the list of authorized SSH keys:

    vi ~/.ssh/authorized_keys

    Paste in the public key from your iPad and save the file. While you’re in there, make sure the permissions on the authorized keys file are correct–you want to make sure only your account can write to this file:

    chmod 644 ~/.ssh/authorized_keys

    Now you’re set up to connect to your Mac via SSH securely.

  5. Back on your iPad, in Coda, create a new Site. Give it a nickname, then tap the globe icon. Leave the Server as SFTP, enter your Mac’s IP address, port 22, your Mac username, then tap the key icon in the password field. Choose the key you created in step 3. If you know the remote path of your Hugo site, you can enter it in the Remote Path field (example: /Users/person/my-site).

  6. Tap the Terminal icon, enter your Mac’s IP address, port 22, your username, and select your SSH key. Once again, if you have the path of your Hugo install, enter a useful startup command to change to that directory when connecting (example: cd ~/my-site). Save your site and tap it to connect.

You’ll be prompted to enter your SSH key passphrase and then, if all goes well, you’ll connect to your Mac and see a list of files. You can open one of your posts for editing, then tap the + button to add a Terminal tab and connect. At this point, you can start your Hugo server and bind it to your Mac’s IP address so it’s accessible from your iPad:

hugo server -D --bind=10.0.0.10 --baseURL=http://10.0.0.10:1313

(10.0.0.10 should be replaced by your Mac’s IP address. The -D argument will make Hugo render drafts.)

Now your server is running, and you’ve got a post open for editing–pull Safari into a split view with Coda and you’ve got a live-updating preview:

Coda + Safari Split View on iPad Pro
This is, honestly, super cool.

The nice thing about this workflow is it’s completely contained within Coda. Launch Coda, open your site, and you’ve got everything you need to write. Pull Safari in and you get an accurate preview of exactly how your work will look once published2.

I genuinely enjoy writing this site from my iPad, and the ease with which I can do it makes me so much more likely to. Those stalled drafts from previous months are now a magical to-do list of posts I’m slowly working my way through.

⬢⬢⬢

I’ll be honest: I’ve tried this iPad thing before. Several times. It never stuck. There was always something, each time, about working on an iPad that felt limiting. The last Pro generation was close, but I found the hardware frustrating–especially Touch ID. On iPhone I liked Touch ID fine, but on iPad, reaching up constantly to unlock the device was very annoying and the sensor was never as good as the one on the phone.

The 2018 iPad Pro hardware is a significant improvement in all aspects. Face ID that works from any orientation, the slimmer bezel, the improved Folio and Pencil, USB-C, and the absolutely blazing-fast processor–these are by far the best iPads Apple has ever made.

Of course, the biggest issue then and now with iPad is iOS. It needs a major overhaul to work better on iPad. Multi-tasking works (hell, this entire post is about using it), but the number of gestures and tricks you have to remember to use it is ridiculous. The spring board is still a hilarious waste of space. No built-in true file browser means you’re stuck with the share/open-in dance to move files around.

If Apple wants iPad to replace the personal computer, they need to build a better version of iOS for it. Until then, it’s working very well as a tool for editing photos and writing posts for this site from the couch. Here’s hoping 2019 takes it much further.

 30 November 2018
 Next:
 Previous:
 Reply on Threads or Mastodon

  1. In 2018 I used this MacBook Pro on the go exactly two times: Once when our internet was down and I had to work out of a coffee shop down the street, and once when I had to bring it into an Apple Store for repair when the battery expanded and tried to explode the damn thing. 

  2. I'll leave it as an exercise for the reader to add the publishing step to this process—from there you can write and publish entirely on your iPad.


Karbon Based is the personal weblog and internet home of Garrett Murray.

Garrett is the Founder & Managing Director of Karbon, a mobile apps design and development agency. His current interests include mechanical keyboards, video games, technology and photography. He lives with his wife, two children, and three pets.

The opinions herein are his own, not an official position of Karbon or its clients. He will always strive to navigate this world ethically and morally, but understands the complexity of separating himself from his company when writing or communicating.