]> git.maquefel.me Git - brevno-suite/hugo/commit
For multiple dimensions setups, fix alias handling and multihost publish path
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 9 Jan 2026 09:47:41 +0000 (10:47 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 10 Jan 2026 14:34:51 +0000 (15:34 +0100)
commit2d80b8a7414294983e622cbc15cc434f5a43758f
treed7ca778c83a44bf17402a088d0cd862c7960e39e
parent5ea3e13db6e436904ee8154bba77af8247b7e534
For multiple dimensions setups, fix alias handling and multihost publish path

* The alias handling was left as is when we added new dimensions in v0.152.0, which meant that if you had `defaultContentVersionInSubDir=true` set, the alias page in the root would not be correctly created.
* Also, if you had multihost setup with multiple dimensions, the publish would be incorrect: The language key was added last instead of first.
* The home page alias handling is reworked and made more robust, which also fixes some subtle issues:

* It now supports redircects for multiple HTML output formats for the home page.
* We skip creating aliases for disabled home pages.
* With potentially multiple output formats with one of them canonical, we added a new  `Canonical` method to the `Page.OutputFormats`, which allows you to do this in a template:

```handlebars
{{ with .OutputFormats.Canonical }}<link rel="{{ .Rel }}" href="{{ .Permalink }}">{{ end }}
```

Fixes #14354
Fixes #14356
config/allconfig/allconfig.go
hugolib/alias.go
hugolib/page__paths.go
hugolib/site.go
hugolib/site_render.go
hugolib/sitesmatrix/sitematrix_integration_test.go
resources/page/page_outputformat.go
resources/page/page_paths.go
tpl/tplimpl/embedded/templates/alias.html