Hugo v0.167.0 is out, bringing relative partial references, slug support for branch pages, and a handful of security hardening fixes. The release focuses on making template trees more portable and giving content authors finer control over URLs, while tightening a few long-standing edge cases.
- Relative partial references: a partial name starting with
./or../is now resolved relative to the directory of the calling partial, so{{ partial "./item.html" . }}fromlayouts/_partials/card/list.htmlworks. Relative paths are only allowed from within partials, and resolving outside the partials directory is an error. See#15373and the documentation. - Slugs for branch pages: the
slugfront matter now works for section, taxonomy and term pages, not just regular pages, and it cascades to descendants. For example,content/help/_index.es.mdwithslug: ayudagives/es/ayuda/,/es/ayuda/avanzado/, and so on. See#14352. - New
build.cleanDestinationDirconfig withkeepFiles/keepDirsGlob patterns (#14937). - Hugo now builds without a config file (
#15393). - Exact numeric comparisons in
eq,where,inand thesetfunctions (#15322,#15358). - Automatic summaries no longer end mid-word.
For developers, the relative partial syntax is the headline change: partial subtrees can now be moved or reused between projects without rewriting every partial call, which matters for shared themes and component libraries. Cascading slugs simplify multilingual section trees where URLs must be translated independently of content paths. Meanwhile, config-free builds and exact numeric comparisons remove small but real sources of friction in CI pipelines and template logic. The security hardening fixes, though unspecified in detail, are worth picking up promptly, so upgrading to v0.167.0 is recommended.
Source: https://github.com/gohugoio/hugo/releases/tag/v0.167.0