hugo v0.99 releases: A Fast and Flexible Static Site Generator built with love in GoLang

Hugo is a static HTML and CSS website generator written in Go. It is optimized for speed, ease of use, and configurability. Hugo takes a directory with content and templates and renders them into a full HTML website.

Hugo relies on Markdown files with front matter for metadata, and you can run Hugo from any directory. This works well for shared hosts and other systems where you don’t have a privileged account.

Hugo renders a typical website of moderate size in a fraction of a second. A good rule of thumb is that each piece of content renders in around 1 millisecond.

It is designed to work well for any kind of website including blogs, tumbles, and docs.

hugo

Changelog v0.99

The theme of this release is error handling – a topic grievously underrated in most development tools. You are often expected to Google this mysterious error and end up in some Stackoverflow thread telling you to use a specific Node version. Hugo has done an OK job in this department, but when I, @bep, recently got stuck with a minify error I had no clue how to debug, I knew we had to take another look at this. There is a list of “error improvements below”, but here is one visual example:

image

The two screenshots above is from the same template error in Hugo v0.98.0 (left) and the new v0.99.0 (right). This is a type error (method not found) in a partial included in a shortcode template. We did a decent job in v0.98.0, too, pointing at correct line in the partial. But the right version has the full stack, with absolute filename, line and column and some file context (highlighted lines) for all of the files involved in the error (Markdown file, shortcode and partial). Having these source file references to click on in the VS Code terminal is a real time saver, especially in Hugo projects with mulitiple file roots (themes, theme components).

A list of the most important “error improvements”:

  • A new server error template (can be overridden in layouts/_server/error.html), always add the content file context if relevant, improve JS errors, Add file context (with position) to codeblock render blocks, add file context to errors in the publishing step (e.g. minify), and more. #9892 #9891 #9893
  • Fix SIGINT handling (allowing to kill the server) after loading bad configuration #9664
  • Improve SASS/SCSS errors (both Dart SASS and Libsass) #9897
  • Fix line numbers in errors from PostCSS, add missing file context to “import not found” #9895

Also worth mentioning is the new clock cli flag (#8787 ) which allows you to “set the clock” and see how your site looks like … in the future.

Download