]> git.maquefel.me Git - brevno-suite/hugo/commit
hugolib: Don't render default site redirect for non-primary isHTML output formats
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 8 Feb 2026 15:20:24 +0000 (16:20 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 8 Feb 2026 16:35:32 +0000 (17:35 +0100)
commit6ac7d081d199325c098ac68281aeb6f8df97be52
tree42f1686e15286afe2c88f2753c2f3bdb8ea0962a
parent24eb84f8681bc86a40c2b737969fb9b8292f26b7
hugolib: Don't render default site redirect for non-primary isHTML output formats

When a custom output format has isHTML=true but no Path, renderDefaultSiteRedirect
would derive intermediate redirect paths from homeLink (e.g. /en/foo.html),
creating a spurious redirect at /en/ that overwrites the actual HTML content.

Only render the default site redirect for the canonical "html" format
or for formats with their own Path prefix (e.g. AMP).

Fixes #14482

Co-Authored-By: Joe Mooring <joe.mooring@veriphor.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hugolib/alias_test.go
hugolib/site_render.go