I like using Panic’s Coda for writing code on iOS but as it doesn’t support git natively and I wanted to be able to edit my Jekyll-based site hosted on Github Pages on my phone, I came up with following workaround.
- GitHub Pages account
- VPS with SSH access (I used $5 per month droplet on DigitalOcean)
- Coda for accessing and editing files via SFTP on iOS
- Jekyll as content generator. It is natively supported by GitHub pages.
To use GitHub pages you need Github account. To create personal page, you have to create repository named
When you commit anything into this repository, GitHub will automatically publish it as a site at
http://githubusername.github.io. It is also possible to publish site at different domain you own. In short:
- Add file named
your.domain.comto the repository.
CNAMErecord pointing to
githubusername.github.ioin your domain’s DNS.
I chose Ubuntu on the droplet. As DigitalOcean allows adding SSH key during installation, first thing I did is disabling password login in
Then packages update:
Required packet installation:
apt-get install git jekyll jekyll-from-redirect ruby ruby-dev make gcc nodejs
Create a user:
useradd -d /home/youruser -s /bin/bash -m youruser
Login and generate keys:
su - youruser ssh-keygen
Accept all the defaults. After generating the key, display its public part with:
And add it as an SSH key in your GitHub keys settings. From now on you will be able to push to your repositories from
youruser username on the VPS.
To allow Coda access to the account, generate new SSH key in the app on your iOS device, copy the public key to
yourusers’s home folder.
You should now be able to connect to the account from Coda.
SSH to your
youruser account and setup git:
git config --global user.name "Your Name" git config --global user.email your@email
Clone the repository:
git clone email@example.com:githubusername/githubusername.github.io
Initialize new Jekyll project as per documentation:
cd githubusername.github.io jekyll new .
Make some changes. You can then run
jekyll serve to see them on
To publish changes, commit and push them to GitHub:
git add -A git commit -m "Initial commit" git push origin master
Changes will be automatically visible at
This post was written entirely on an iPhone using Coda and a VPS.