Pushing to My Site from My Phone
I can now push to my site from my phone via rsync! I added my Termux install’s ssh pub key to my nearlyfreespeech.net account. I wrote a one line script to make the rsync call that Guillermo Garron describes on his blog:
rsync -v -rzz --checksum --chmod=Du=rwx,Dgo=rx,Fu=rw,Fog=r --delete <path-to-site>/ <user>@<server>:/<path>
I had to install rsync via the following command:
pkg install rsync
The -z compression option Garron recommends doesn’t work in Termux but switching to -zz (as the command’s own warning states) does work.
I also found that I can’t use --delete
right now because I still can’t build my less based css on my phone. So hugo’s public folder is missing some stuff that it needs. I’ve added a TODO to the script to re-add the flag when I get that working.
UPDATE: After writing this I found that I was having some permissions issues. Therefore I’ve updated the command with a chmod to set folders 755 and the files to 644 per instructions from Server Fault. I was also able to write a termux compatible build. So I’ve re-added --delete
.
UPDATE 2022-11-26: This is now part of a series of mini articles I’ve written about building my hugo site from my phone. You can find info on setting up termux and git clone here and info on setting up hugo itself here.
-
I’m writing this entirely from my Android phone! I spent quite a few hours trying to figure out how to get a clone of my git repository on here and hit a lot of dead ends. I tried multiple sets of instructions for AIDE and mGit with no success. Finally I found the Termux app which actually supports everything I need! For some reason Termux was not coming up in any of my searches for git clients on Android.
-
I started setting up Hugo to run my site. Hopefully this will decrease the friction for blogging and I’ll start writing more, but I make no promises.
So far Hugo seems to be a pretty straight forward site generator. After developing Adobe Experience Manager customizations professionally for 5 years this feels nice and simple. When I was picking between the various blogging platforms I had a number of criteria:
Minimal Set Up Full Control Over Design and Markup Minimal Cost (this quickly led me to static site generators) Markdown support Full Control over site structure I also looked at IndieWeb support.
-
So I finally took the time to set up https on my site. For some reason I thought it was going to be harder. Many thanks to the Let’s Encrypt guys for making this the most braindead simple process in the world.
I feel bad for not having done it before. I guess I just expected it to be more involved. I’ve been trying to bite the bullet and actually complete things on my TODO list lately.