# Hugo v0.161.0 - Product: Hugo (https://whatsnew.fyi/product/hugo) - Vendor: Hugo - Date: 2026-04-28 - Version: v0.161.0 - Original notes: https://github.com/gohugoio/hugo/releases/tag/v0.161.0 - Permalink: https://whatsnew.fyi/product/hugo/releases/v0.161.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: release facts (products, versions, dates, links, CVE ids and flags) are open data under CC BY 4.0, from the API at https://whatsnew.fyi/api/v1 or the nightly dataset at https://github.com/whatsnew-fyi/dataset. The summaries, labels and curation are © What's New: quote freely with attribution and a link back; wholesale republication of them is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- Changes to check: - **Requirement raised:** `Node` → `22` (inferred by a model) - **Removed:** `standalone executable` → `Tailwind CSS CLI installed as a Node.js package` (inferred by a model) - **Behavior changed:** `security.node.permissions` (inferred by a model) - **Behavior changed:** `security.http.urls` (inferred by a model) - **security** — Run Node tools PostCSS, Babel and TailwindCSS with the --permission flag using permissions defined in security.node.permissions, requiring Node >= 22 and TailwindCSS CLI as a Node.js package instead of standalone executable - **security** — Make defaults in security.http.urls more restrictive and add negation support with '! ' prefix to Whitelist - **added** — Support nested hugo:vars/ imports in css.Build and css.Sass with target matchers - **added** — Add slice-based permalinks configuration using the same target matchers as cascade config - **added** — Add flexible filename identifier scheme supporting language_, role_, version_, outputformat_, mediatype_, kind_, and layout_ prefixes - **fixed** — Fix translation lookup when using language variants - **fixed** — Fix non-deterministic conflict detection in hugo new content - **fixed** — Fix environment isolation for configuration settings - **fixed** — Fix filename dimension identifiers (_role_X_, _version_X_) to replace mount config - **fixed** — Fix auto-fallback to page resources in other roles and versions - **fixed** — Do not render aliases if the page is not rendered - **changed** — Improve default content language fallback - **changed** — Use Language.Locale as primary localization key - **changed** — Honor the Eqer interface in where comparisons for collections - **changed** — Ignore non-require blocks in go.mod rewrite - **deprecated** — Deprecate extended and extended_withdeploy editions This release contains two security hardening fixes: * We now run the Node tools PostCSS, Babel and TailwindCSS, by default, with the `--permission` flag with the permissions defined in [security.node.permissions](https://gohugo.io/configuration/security/). This means that you need Node >= 22 installed and that `css.TailwindCSS` now requires that the Tailwind CSS CLI must be installed as a Node.js package. The [standalone executable](https://github.com/tailwindlabs/tailwindcss/releases/latest) is no longer supported * We have made the defaults in [security.http.urls](https://gohugo.io/configuration/security/#httpurls) more restrictive. But there are some notable new features, as well: ##### Nested vars support in css.Build and css.Sass A practical example in `css.Build` would be to have something like this in `hugo.toml`: ```toml [params.style] primary = "#000000" background = "#ffffff" [params.style.dark] primary = "#ffffff" background = "#000000" ``` And in the stylesheet: ```css @import "hugo:vars"; @import "hugo:vars/dark" (prefers-color-scheme: dark); :root { color-scheme: light dark; } ``` ##### Slice-based permalinks config The `permalinks` configuration is now much more flexible (the old setup still works). It uses the same [target](https://gohugo.io/configuration/cascade/#target) matchers as in the `cascade` config, meaning you can now do: ```yaml permalinks: - target: kind: page path: "/books/**" pattern: /books/:year/:slug/ - target: kind: section path: "/{books,books/**}" pattern: /libros/:sections[1:] - target: kind: page pattern: /other/:slug/ ``` The above example isn't great, but it at least shows the gist of it. ##### A more flexible scheme for identifiers in filenames What we had before was e.g. `content/mypost.en.md` which told Hugo that the content files was in English. With the new setup you could also name the file `content/mypost._language_en_.md`. This alone doesn't sound very useful, but this allows you to use more prefixes: | Prefix | Description | Relevant for | | --------------- | ------------- | ------------------------- | | language_ | Language | Content and layout files. | | role_ | Role | Content and layout files. | | version_ | Version | Content and layout files. | | outputformat_ | Output format | Layout files. | | mediatype_ | Media type | Layout files. | | kind_ | Page kind | Layout files. | | layout_ | Layout | Layout files. | ##### All Changes * langs/i18n: Fix translation lookup when using language variants 72b85d5f @jmooring #7982 * create: Fix non-deterministic conflict detection in hugo new content 6436deb3 @jmooring #12602 #12786 #14112 #14769 * commands: Fix environment isolation for configuration settings 1eea9fba @jmooring #14763 * Fix filename dimension identifiers (_role_X_, _version_X_) to replace mount config 8d6145f3 @bep #14756 * Fix it so we never auto-fallback to page resources in other roles/versions 97477242 @bep #14749 #14752 * css: Support nested hugo:vars/ imports 7622dd86 @bep #14705 * github: Update GitHub actions versions 0814059b @bep #14810 * hugolib: Do not render aliases if the page is not rendered 8920d56e @jmooring #14807 * langs/i18n: Improve default content language fallback 633cc772 @jmooring #14243 * helpers: Remove unused code 4c40c6d5 @bep * common/constants: Remove unused consts d2594db6 @bep * common/paths: Remove unused code ab2de51e @bep * tests: Update Ruby setup action to v1.305.0 75f61832 @jmooring * langs: Use Language.Locale as primary localization key 1b7495bc @jmooring #9109 * config/security: Add "! " negation to Whitelist, harden default http.urls 79f030be @bep #14792 * Harden Node tool execut _[Truncated at 4000 characters — full notes: https://github.com/gohugoio/hugo/releases/tag/v0.161.0]_