Skip to content

chore: bump github.com/gohugoio/hugo from 0.146.3 to 0.166.0 - #316

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/gohugoio/hugo-0.166.0
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/gohugoio/hugo-0.166.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 16, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/gohugoio/hugo from 0.146.3 to 0.166.0.

Release notes

Sourced from github.com/gohugoio/hugo's releases.

v0.166.0

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

  • tpl/transform: Bump fileCacheEntryVersion in transform.ToMath (note) 8d88b8b4 @​bep #15267
  • resources/images: Bump formatVersionNumbers.PNG and fix version cache busting for images.Filter (note) d19e0a4b @​bep #12536 #12543 #15266
  • warpc/js: Upgrade katex to 0.18.4 (note) ec52e638 @​bep #15254
  • hexec: Fail on symlinks that escape the Node.js permission paths c05c012a @​bep
  • config/security: Deny text/org content by default e6abb9c3 @​bep
  • config/security: Add http.proxyFromEnvironment and document the resolved address check 6a2a955d @​bep #15301 #15302
  • deps: Upgrade github.com/gobwas/glob v0.2.3 => v1.0.0 efd24562 @​bep #15273
  • hugofs: Drop symlinked mount roots 938c8206 @​bep
  • tpl: Improve the return keyword in templates 8405b802 @​bep #15212
  • resources/page: Don't let a title's "/" split an auto-derived slug 39507d51 @​ipince #4092 #3577 #5571 #4090

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:

... (truncated)

Commits
  • 78400b4 releaser: Bump versions for release of 0.166.0
  • 3fbfd27 build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2
  • 393de58 build(deps): bump golang.org/x/sync from 0.22.0 to 0.23.0
  • 870f746 build(deps): bump golang.org/x/mod from 0.40.0 to 0.41.0
  • ae07063 tpl/strings: Fix replaceRE with zero-width assertions
  • 6152e22 build(deps): bump github.com/getkin/kin-openapi from 0.146.0 to 0.149.0
  • 5b6e7c2 build(deps): bump github.com/bits-and-blooms/bitset
  • 5130d00 common/hreflect: Fix the off-by-one in the float to int overflow guards
  • c05c012 hexec: Fail on symlinks that escape the Node.js permission paths
  • 857120b js: Add es2025 as supported build target
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/gohugoio/hugo](https://github.com/gohugoio/hugo) from 0.146.3 to 0.166.0.
- [Release notes](https://github.com/gohugoio/hugo/releases)
- [Commits](gohugoio/hugo@v0.146.3...v0.166.0)

---
updated-dependencies:
- dependency-name: github.com/gohugoio/hugo
  dependency-version: 0.166.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Sep 16, 2026
@github-actions github-actions Bot added the stale label Sep 24, 2026
@github-actions github-actions Bot closed this Sep 27, 2026
@dependabot @github

dependabot Bot commented on behalf of github Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/go_modules/github.com/gohugoio/hugo-0.166.0 branch September 27, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants