Hugo 0.18 Released: Everything Now a Page, and Twice as Fast!
A nice Christmas present: We released Hugo 0.18 today – the very popular static website generator written in Go! Loaded with new and exiting features – and with dramatically improved performance!
Grab the binary of your choice here.
Today, we’re exited to release the much-anticipated Hugo 0.18!
We’re heading towards the end of the year 2016, and we can look back on three releases and a steady growing community around the project. This release includes over 220 contributions by nearly 50 contributors to the main codebase. Since the last release, Hugo has gained 1750 stars and 27 additional themes.
Hugo now has:
- 13750+ stars
- 408+ contributors
- 137+ themes
@bep once again took the lead of Hugo and contributed a significant amount of additions. Also a big shoutout to @digitalcraftsman for his relentless work on keeping the documentation and the themes site in pristine condition, and also a big thanks to @moorereason and @bogem for their contributions.
We wish you all a Merry Christmas and a Happy New Year.
The Hugo team
The primary new feature in Hugo 0.18 is that every piece of content is now a
Page ( #2297 ). This means that every page, including the home page, can have a content file with frontmatter. Not only is this a much simpler model to understand, it is also faster and paved the way for several important new features:
- Enable proper titles for Nodes #1051
- Sitemap.xml should include nodes, as well as pages #1303
- Document homepage content workaround #2240
- Allow home page to be easily authored in markdown #720
- Minimalist website with homepage as content #330
Hugo again continues its trend of each release being faster than the last. It’s quite a challenge to consistently add significant new functionality and simultaneously dramatically improve performance. Running this benchmark with these sites (renders to memory) shows about 60% reduction in time spent and 30% reduction in memory usage compared to Hugo 0.17.
Other New Features
Pagenow has a
Kindproperty. Since everything is a
Kindis used to differentiate different kinds of pages. Possible values are
taxonomyTerm. (Internally, we also define
404, but those have no practical use for end users at the moment since they are not included in any collections.)
- Add a
enableGitInfois set. It then also sets
Lastmodfor the given
Pageto the author date provided by Git. #2291
- Implement support for alias templates #2533
- New template functions:
- Add shortcode to display Instagram images #2690
noChmodoption to disable perm sync #2749
quietbuild mode #1218
.Site.Pageswill now contain several kinds of pages, including regular pages, sections, taxonomies, and the home page. If you want a specific kind of page, you can filter it with
.Site.RegularPagesis a shortcut to the page collection you have been used to getting.
RSSlinkis now deprecated. Use
RSSLinkinstead. Note that in Hugo 0.17 both of them existed, so there is a fifty-fifty chance you will not have to do anything (if you use a theme, the chance is close to 0), and
RSSlinkwill still work for two Hugo versions.
- Revise the
basetemplate lookup logic so it now better matches the behavior of regular templates, making it easier to override the master templates from the theme #2783
- Add workaround for
blocktemplate crash. Block templates are very useful, but there is a bug in Go 1.6 and 1.7 which makes the template rendering crash if you use the block template in more complex scenarios. This is fixed in the upcoming Go 1.8, but Hugo adds a temporary workaround in Hugo 0.18. #2549
- All the
Paramsconfigurations are now case insensitive #1129 #2590 #2615
- Make RawContent raw again #2601
- Fix archetype title and date handling #2750
- Fix TOML archetype parsing in
- Fix page sorting when weight is zero #2673
- Fix page names that contain dot #2555
- Fix RSS Title regression #2645
- Handle ToC before handling shortcodes #2433
- Only watch relevant themes dir #2602
- Hugo new content creates TOML slices with closing bracket on new line #2800
- Add page information to error logging in rendering #2570
RSSlinkin favor of
- Make benchmark command more useful #2432
- Consolidate the
- Allow to set cache dir in config file
- Performance improvements: