Skip to content

Update dependency gohugoio/hugo to v0.167.0 - #300

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/gohugoio-hugo-0.x
Oct 2, 2026
Merged

renovate[bot] merged 1 commit into
mainfrom
renovate/gohugoio-hugo-0.x

Conversation

@renovate

@renovate renovate Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Update Change
gohugoio/hugo minor v0.163.3 → v0.167.0

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

gohugoio/hugo (gohugoio/hugo)

v0.167.0

Compare Source

This release brings relative partial references, slug support for branch pages, and a handful of security hardening fixes.

Relative partial references. A partial name starting with ./ or ../ is now resolved relative to the directory of the calling partial. This makes it much easier to write self-contained, movable partial trees, e.g. {{ partial "./item.html" . }} from within layouts/_partials/card/list.html. Relative paths are only allowed from within partials, and paths resolving outside the partials directory is an error. See #​15373 and the documentation.

Slugs for section, taxonomy and term pages. The slug front matter now works for branch pages, not just regular pages, and it cascades to descendants. This is particularly useful in multilingual sites, where e.g. content/help/_index.es.md with slug: ayuda gives /es/ayuda/, /es/ayuda/avanzado/ etc. See #​14352.

Other notable improvements include the new build.cleanDestinationDir config with keepFiles/keepDirs Glob patterns (#​14937, docs), hugo now builds without a config file (#​15393), exact numeric comparisons in eq, where, in and the set functions (#​15322, #​15358), and automatic summaries that no longer end inside an open list or blockquote (#​14044).

Security

This release contains several hardening fixes. None of them are known to be exploited, but if you build sites with untrusted themes or modules, you should upgrade.

  • Sass imports not found in Hugo's file systems were resolved by the Sass compiler itself, which follows symlinks and knows nothing about the project root. A theme could import a file outside the project and get its content into the published CSS. These imports are now resolved by Hugo and checked against the same security.allowRead roots as the Node.js tools and js.Build. 41040cc (thanks to @​Hama1cco)
  • Likewise, imports not found in /assets were resolved and read by ESBuild itself. The resolved path is now checked against the allowed read paths before ESBuild loads it. 2aa51f3 (thanks to @​Hama1cco)
  • A symlinked directory in a theme at the parent of a nested mount could expose files outside the module. 2fe9bab
  • Explicit heading IDs (e.g. ## Foo {id="..."}) were written unescaped into the table of contents href, allowing attribute breakout. 671fbf2

Note

  • The default baseURL is now https://example.org/ (it was empty). Hugo has always required a valid URL to work properly, so this mostly affects new and test sites, but if you relied on the empty default for relative URLs, set baseURL explicitly. bc68654 @​bep #​14625 #​15384
  • The root cleanDestinationDir config key is deprecated in favour of build.cleanDestinationDir.enable. The --cleanDestinationDir flag maps to the new key. Note that .git files in the publish dir are now kept by default. 9086193 @​bep #​14937
  • eq now compares numeric values the same way as lt, le etc., so e.g. eq 1 1.0 is now true. Also, in, intersect, union, uniq, symdiff, complement and where's in/not in now compare numbers exactly rather than via float64, and no longer require the Go types to match. 4d628bb 366377b @​bep #​15322 #​15358
  • A user table render hook is now preferred over the embedded one. 140d936 @​jmooring #​15389
  • Automatic summaries are expanded past summaryLength when needed so they don't end inside an open container element. This may change the summary for some pages. d692a24 @​bep #​14044

Bug fixes

Improvements

Dependency Updates

Documentation

Build Setup

v0.166.0

Compare Source

This release is mostly about hardening and bug fixes, but there are some notable changes:

  • .Render now takes an optional context argument: {{ .Render "view" $ctx }}, mirroring the partial API. This makes it possible to pass e.g. a dict to a content view. See #​15077.
  • The return keyword in templates has been reimplemented. It now works in any template (not just partials) and can be used anywhere, e.g. inside if or range blocks. See #​15212.
  • New resources.Publish template function and IndexOf method on Pages.
  • related config: new tokenize option for index values, and index creation is faster.
  • Several security fixes; see the notes below.
Note
Glob patterns

The glob library used for e.g. module mounts (includeFiles, excludeFiles), cascade targets, segments, deployment matchers and noVendor has been upgraded to v1.0.0. This is a complete rewrite of the matching engine that fixes a long list of correctness bugs, but it also means that some patterns may behave differently:

  • Malformed patterns (e.g. an unclosed {, an empty [] class) now fail with a syntax error instead of being silently accepted.
  • ** matches any sequence of characters including separators, but it is not the **/ "globstar" of shells: **/x requires the literal / and does not match x, and a/**/b does not match a/b. Use {**/,}x if you need both.
  • \ is the escape character, so a literal backslash must be written as \\.

If a pattern that used to match no longer does (or vice versa), it was most likely relying on a bug in the old engine.

Security
  • text/org content is now denied by default, as Org mode's export blocks and @@html:...@@ snippets pass raw HTML through unescaped, making it the same XSS sink as text/html. Sites with Org content can opt back in via security.allowContent.
  • Remote fetches (resources.GetRemote etc.) now validate the resolved address at dial time and reject loopback, private, link-local, CGNAT and similar ranges. This only applies under the default security.http.urls allowlist; if you have customized it, you have opted into your own hosts and the check stands down. Proxies from HTTP_PROXY/HTTPS_PROXY hide the destination address from this check and are now ignored unless you set security.http.proxyFromEnvironment = true.
  • Node.js tools (PostCSS, Tailwind CSS etc.) now fail before invocation if a symlink inside the project resolves outside the allowed read/write roots. If you have a legitimate link, add its target to security.node.permissions.allowRead.
  • Mount roots that are themselves symlinks (e.g. themes/mytheme/assets -> /somewhere/else) are now dropped. This closes a gap in the themes/ confinement; absolute mount source values are still allowed.
Other
  • {{ return <value> }} outside a partial is now an error; it was previously silently ignored.
  • A page without an explicit slug whose title contains a / (e.g. Watch/listen to this) now gets a single URL segment (.../watch-listen-to-this/) instead of a nested one (.../watch/listen-to-this/). Taxonomy and term pages are not affected.
  • Hugo is now built with Go 1.27.
KaTeX

When upgrading to Hugo v0.166.0, sites using transform.ToMath with the output option set to html or htmlAndMathml must update the KaTeX stylesheet referenced in their template(s) to version 0.18.4 or higher. Using older CSS versions like 0.16.21 will cause certain mathematical or chemical expressions to render incorrectly.

Example update:

- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css">
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.18.4/dist/katex.min.css">

See these examples:

Bug fixes
Improvements
Dependency Updates

v0.165.0

Compare Source

The two main new things is the new css.ChromaStyles template func and the new importContext option demonstrated below.

{{ $light := css.ChromaStyles (dict "targetPath" "css/components/chroma-light.css" "style" "github" "mode" "light") }}
{{ $dark := css.ChromaStyles (dict "targetPath" "css/components/chroma-dark.css" "style" "github" "mode" "dark") }}
{{ $opts := dict "minify" true "importContext" (slice $light $dark) }}
{{ $css := resources.Get "css/main.css" | css.Build $opts }}

The importContext is relevant for css.Build, js.Build, css.Sass, and css.PostCSS. and it allows you to make resources (e.g. built from resources.FromString) resolvable in e.g. CSS @import statements.

Note

Bug fixes

Improvements

Dependency Updates

Documentation

v0.164.0

Compare Source

Notable new features in this release are:

Notes

Changes

Dependency Updates


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • On day 1 of the month, every 3 months (* * 1 */3 *)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot enabled auto-merge (squash) October 1, 2026 05:03
@renovate
renovate Bot force-pushed the renovate/gohugoio-hugo-0.x branch from 05c7be0 to aa59328 Compare October 1, 2026 17:15
@renovate
renovate Bot force-pushed the renovate/gohugoio-hugo-0.x branch from aa59328 to 5223948 Compare October 1, 2026 21:48
@renovate
renovate Bot merged commit e11a4b1 into main Oct 2, 2026
14 checks passed
@renovate
renovate Bot deleted the renovate/gohugoio-hugo-0.x branch October 2, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants