Edit your website on your android phone using termux and git!
In the last post, I showed you how to set up your server so you can deploy with git. Today, I'll show you how to write on your phone and directly deploy it to your server!
I am writing these posts on iA Writer, my favourite markdown editor, but any text editor should work.
You need to download termux and install git. Termux on google play is unsupported, so we will need to install the alternative store F-Droid first.
- install F-Droid
- Install termux from F-Droid
- Run termux-setup-storage
- Run mkdir ~/storage/shared/workspace
- Run ln -s ~/storage/shared/workspace ~/workspace.
- Now the folder workspace is reachable in the homefolder and this is where we'll put the git repo, but first we'll need to setup ssh
- pkg update
- pkg upgrade
- Run pkg install openssh
- mkdir ~/.ssh
- Nano ~./config (read the post before to know what to put in there)
- check connection by running ssh example.com
- Go to the workspace folder, and run git clone ssh://example.com/path/to/your/.git
- You can now open those files in iAWriter using the file selector. Make changes, commit using git commit -am "message" and git push.
- Your changes are online.
Success!
This website is written in PHP and markdown posts and using this way I can easily update it on my phone.