Streamlined publishing
Maybe I can make writing a habit by simply doing it once a day. But the process of publishing would need to be simpler.
I still struggle with a hybrid world. Hugo is currently only running on my windows workstation and rysnc
only works on my WSL.
I could try to debug my hugo installation on WSL, but I am too lazy to do that. I could also use robocopy
instead of rsync
, but I don’t want to go that way either (working with ssh keys was a bit of a pain).
Now I created a quick & dirty script to do my tedious tasks of publishing new posts:
# cleaning the public folder
Remove-Item ./public/* -Force -Recurse
# generating new static content
hugo
# uploading content
wsl rsync -avz --delete public/ user@server:/path
Thoughts on further improvement:
- Create a separate user with a passwordless key to remove the necessity to enter the ssh passphrase
- The separate user would need to be restricted to the hugo html folder
- Instead of
robocopy
I could look into thewinscp
cli commands - Thinking about a server installation of hugo – Currently posting is restricted to my workstation
- Github Pages (or something similar) would also work, but I like that I am not depending on a third party service