I recently decided to move my site over to Hugo, a static site generator framework. Although similar in a lot of ways to Jekyll which I’d previously been running on, Hugo fits my needs and development environment much better.
Running on Windows it’s easy to setup and get going.
InstallationNote: I'm installing the "extended" version of Hugo as this is required in order to process scss stylesheets using Hugo's pipeline.
choco install hugo-extended
choco install git -params '"/GitAndUnixToolsOnPath"'
Setting up a siteFollow the quick start guides on the Hugo site for information on getting started.
Testing locally on Windows is also simple, run the following from Powershell to start the server. Hugo will continually monitor local files for changes and update the site instantly. The ‘-D’ flag shows pages that are still in draft.
hugo server -D
There are many providers that allow you to host and run a Hugo site; I decided to go with Netlify. It provides free hosting for Hugo sites and can build and deploy directly from source control like Git and Bitbucket.
When linking Netlify to Bitbucket or Git, it automatically sets up most of the required options and starts continual integration builds. You should however set the Hugo version in the ‘Build Environment Variables’ in the Build & Deploy section of the Netlify site.
HUGO_VERSION = 0.54.0
UpdatingUpdates are provisioned quickly by changing locally, testing and committing to source control. Once Netlify is setup it will automatically pull from your repository and deploy an updated site within a minute. As an infrequent Git commandline user I often find I'm referring to documentation to remember exactly how to push updates to the server. I found a nice Windows Git UI called Sourcetree which takes the pain out of it. I can now quickly change a page, test it locally and push to Bitbucket within a minute.
I’m also running my domain through the ever popular Cloudflare service which provides excellent/fast DNS, caching, analytics & SSL to name a few features. It’s quick and simple to setup and free for your first domain.