I use since some years Hugo as my static site generator. I like it a lot, it is fast, reliable, open source, with an amazing community and works perfectly well.
After you setup the site, you just create content, make the new content and upload it to your server.
You make the content available to the site with hugo
, you serve the content to test it locally with hugo server
, then you need to deploy the site.
I use a little Linux VPS for my blog. So, I access it through SSH. One way to update my site is to copy the generated content :
1scp -rv public/* user@remote:/path/to/blog/
This is one way, a little bit dirty and not comfortable.
So, I make a bash script to accomplish the deploy that has 3 lines.
1rm -rf /tmp/spf44
2hugo -s /home/juan/blog/ -d /tmp/spf44
3rsync -az --force --progress -e "ssh" /tmp/spf44/ juan@server:/path/to/blog
This uses a directory called spf44 in tmp, then deploys the content with hugo to it, and after that uses rsync to update the content.
Apply to the file, called deploy.sh, running permissions, and then execute it:
1chmod +x deploy.sh
2./deploy.sh
After that your Hugo site is updated. You can use it with other kind of site generators or contents created by hand, too.