I found Hugo in 2017 and since then I have used it to build a lot of web sites. Building sites with Hugo is fun! For customer sites where an editor need to keep the site updated I early on started to use Forestry.
Last year I built a number of Hugo sites that takes the content from Notion and Airtable via their respective API. It works really well. Users manage the data in Notion or Airtable and the sites are kept updated in the background automatically.
One of the big advantages with static sites are that you can host them almost anywhere. I have found that GitHub pages is one of the most convenient hosting solutions. With the help of GitHub actions the deployment process can be completely automated.
I recently added a Content Security Policy header to my web servers. I found a number of issues around getting analytics and embedded videos and maps working. Other sites will have more issues but I suspects these are among the most common.
Hugo Pipes was added in version 0.46 and give Hugo the possibility to process sass and postcss files as well as fingerprint, minify and concat asset files. My own Zen theme for Hugo have used Gulp to process sass and js but now I have updated it to make use of pipes.
I have made my small company site multilingual, in Swedish and in English. It’s a static site built with Hugo and my own Zen theme for Hugo. Hugo has good multilingual support. What took the most time was building a language selector that works both when content is translated and when it is not.
I have released the css grid version of my Zen theme for Hugo. This site have been using it for a couple of month. Read more at Layout with CSS grid and flex, it’s really nice. With the resent release of Microsoft Edge 16 there is support for css grid in all the major browsers.
Hugo introduced custom output formats in version 0.20 and here I will be using it to generate two different JSON outputs for my site. First a search index that can be used with various search solutions. Second a JSON Feed, a new alternative for RSS feeds.
xdeb.org is now generated with Hugo, the static site generator that I wrote about in my last post Using Hugo for a simple web site and porting the Drupal Zen theme. One less Drupal site to keep updated. Now it’s “only” the content I need to add and update here.
A couple of years ago static web site generators was the next big thing. I have been meaning to try one out and last week I had the opportunity. I went to Top Open-Source Static Site Generators - StaticGen to see what the options where nowadays.