Blogging on the iPad01 Jan 2017
Why do this?
Like most people who are trying the ‘iPad Work Lifestyle’, half the fun of trying it is the challenge to doing work a in different way. At times, working on the iPad certainly makes you think about how to solve problems to do the ‘simplest things’. Tasks that are natural on PCs may involve lateral thinking to complete on iOS.
It’s not all bad though. Single focus apps (or at most 2 in split screen view) do make it easier to concentrate on the task in hand. Also many apps are exceedingly well designed to do a few things very well rather than more general purpose PC apps.
Most of all, it somehow feels much more fun to write this on my iPad that it ever would on either my Mac or my Windows PC. I can’t really define why (novelty perhaps?), but it just does.
Right now, for me it’s all an experiment for 2017, so we’ll see how I feel later in the year if I keep this up.
My iPad is a 2016 9.7 inch Pro model, and I love it. The display is truly outstanding, and it’s a really nice mix of relative power and portability.
I’m currently using an Amazon Basic Bluetooth Keyboard that I’ve had for a while (not sure it’s still available). It’s really light and easy to toss in my bag if I’m going out and about.
The keyboard does the job, but am seriously considering investing in either an Apple or Logitech Smart Keyboard Cover at some point, mainly for convenience. They’re not cheap though, so not sure right now if they’re worth it.
Jekyll static site
I run quite a few of my sites on Jekyll, a static site generator popularised by GitHub. It’s pretty powerful (runs on Ruby), fully customisable, cross-platform, and is great for blogging in Markdown.
I like Jekyll anyway, but it makes it a good fit for this blog as it means I can write posts in Markdown and not have to worry too much about running some sort of web server on the iPad.
I’ve been using Digital Ocean for a year or so, and are really liking the simplicity of their setup and excellent documentation and support.
My virtual server is running Ubuntu 16.04, and I’m using NGINX as the web server pointing to the static site.
You need to be happy with the UNIX command line to setup the server, but I’m reasonably proficient and it’s much better (for me) to have full control over my server rather than being on a cheap shared host somewhere.
The code for the site is all held in GitHub, and actually could be hosted from there as GitHub repositories can natively serve Jekyll sites.
This is really useful as I can test any changes after checking them in (via https://bravelocation.github.io/writingontablets.com/ if you are interested too!). This is really handy to check everything works before making the changes go live, as the preview of images etc. doesn’t work great in Textastic (see below)
I wanted to make this site HTTPS from the start - for both security and for Google ranking - and on my setup it’s easy to do this through Let’s Encrypt.
Let’s Encrypt offer free certificates for your web server, and can be kept up to date through automation. It’s a great service, and no-one has any excuse nowadays for not offering a secure site to thier customers.
Working Copy (for Git)
As mentioned above, using GitHub is central to how my blogging setup works. Working Copy is a really nice (and highly recommended) Git client for iOS.
As well as the obvious Git functions, it also works as a document provider making it easy to open files in your repository in other programs.
Textastic (for text editing)
Textastic is a powerful multi-language code editor for iOS.
It has syntax highlighting for multiple languages (useful for me as I will not just be writing this blog on my iPad), and has a well thought out extended keyboard perfect for coding.
The built-in markdown preview is also pretty decent too, which helps a lot during the initial editing of posts.
I’m still working on the best solution for cropping and editing images ready for the site.
Right now I’m using screenshots direct from the iPad, or photos taken on my iPhone and cropping them using the built-in editing features in Photos.app, but that means the images are too large for the web site (even though the CSS handles the resizing well).
I suspect I’ll build some Workflows (see below) to handle the resizing part, but I haven’t done that yet.
I think most people who use their iPad for more than just content consumption will know about Workflow, the indepensible app for iOS automation.
I’m sure I’ll write more about how I’m using Workflow to simplify many tasks I need to do, but right now I have a script I use for releasing any changes to the site.
My process for publishing a new post is as follows:
- Write the new post in markdown
- Check the changes into Git, and push them up to GitHub
- Check the post looks OK on the GitHub-hosted site
- Log into the production server (via SSH), pull the latest changes from GitHub and then
jekyll buildthe updated static site to generate the latest changes.
I have a nice Workflow that utilises the SSH action, which means I can automate the final point without having to actually use an SSH client (I can use Prompt 2 if I actually need full SSH access).
The code in the ‘Run Script over SSH’ action loooks like this:
source .bash_profile cd websites/[Directory] git pull /usr/local/rvm/gems/ruby-2.2.1/wrappers/bundle exec jekyll build
Note [Directory] is a variable I set earlier in the workflow from a multiple choice list, so I can reuse this script for my other sites hosted on my server.
I had to add in the
source .bash_profile (and the full path to the ruby bundle command) to get this to work reliably, but it’s a really quick way of pushing changes out with very little work.
So far, using the above process is working pretty well, and other than optimising the images I haven’t had to revert to using my Macbook Pro to do anything yet. Hopefully I’ll find an efficient way of handling images too soon.
It also means I can work on the site from anywhere, as it’s almost inconceivable I’ll be somewhere without either my iPad or my iPhone. That would be weird!
If you have any comments, improvements or suggestions, let me know on Twitter at @yeltzland