By dave | October 30, 2016

example screenshot 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.

Update December 2016

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:

On the local box

  • ensure local is up to date git pull
  • make any changes that are needed (the difficult bit)
  • test the changes locally hugo -w server
  • get the changes onto master git push

On the host

  • get the changes onto the server git pull
  • stop apache service htttp stop
  • remove the old content rm -rf <your web directory>
  • rebuild the site hugo -d <your web directory>
  • start apache service httpd start

As 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.

Other pages within this category

comments powered by Disqus

We use cookies to analyse traffic and to personalise content. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Please see our privacy policy should you need more information or wish to adjust your settings.

Send a message
X

This message will be securely transmitted to Nutricherry LTD servers.