For the first time ever, this site is now statically generated using hugo content templating system, I wish I'd
done it years ago. For technology sites it really is like a breath of fresh air, as there is no more playing around
trying to get code and technical content into an online editor designed for WYSIWYG general purpose blog editing.
For some time, I had kept the misconception that a CMS had to be dynamic; that was until I found I was spending considerable time trying to keep my Joomla system up to date and safe. I think at times I spent more time backing it up and running it locally to stage updates, rather than building content.
There’s no doubt problems with static hosting too, and over the next months I’ll stumble into them, but at least generally speaking, as long as my webserver and host are up-to-date, things should be more secure.
In the latest version of IntelliJ IDEA (2016.3) it now has a preview pane for markdown content, this means that it is possible to get an immediate view of what the site will look like while creating.
Also, I now have the site set up so that it is stored in git, and is built from git in a couple of minutes. My new procedure is simply:
git pullhugo -w servergit pushgit pullservice htttp stoprm -rf <your web directory>hugo -d <your web directory>service httpd startAs you can see above, the majority of steps are actually running simple git commands. As long as your repo is hosted somewhere fairly resilient then your site is always backed up implicitly, and in the worst case of it being hacked or defaced, you just rebuild it using the host steps. Make sure that the host’s git access is read only.
In short I like static hosting so much, I’ve moved our nutricherry site over to it as well.