]> git.maquefel.me Git - brevno-suite/hugo/commit
Fix some default site redirect woes
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 11 Jan 2026 14:30:33 +0000 (15:30 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 11 Jan 2026 20:50:10 +0000 (21:50 +0100)
commita77548830407851d3a8d24085a7f5dc131ca886e
tree335a3cabb2ee42bd1af88282827254e1ebc60413
parent66ba63cd5f30ef8807fc524dbc67399376299bb1
Fix some default site redirect woes

* The fix for #14357 yesterday sadly had the assumption that default language/version/role always was the first site in the sites matrix. This is common, but not always true.
* Also, that fix forgot to add a redirect the other way when `defaultContentLanguageInSubdir` was disabled, e.g. from `/en/` to `/`.
* This commit also renames config option `DisableDefaultDimensionRedirect` to `DisableDefaultSiteRedirect`. This is stricly a breaking change, but it's only been out for a day, and the old name didn't make much sense.

Fixes #14361
.prettierignore [new file with mode: 0644]
config/allconfig/allconfig.go
hugolib/site.go
hugolib/site_render.go
hugolib/sitesmatrix/sitematrix_integration_test.go
tpl/tplimpl/embedded/templates/alias.html