404 not handled correctly with multilingual websites when defaultContentLanguageInSubdir enabled
CravateRouge opened this issue · 1 comments
CravateRouge commented
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/HugoBlox/hugo-blox-builder/issues?q=is%3Aissue
- This issue is not a question, feature request, or anything other than a bug report directly related to Hugo Blox Builder. Please post those things on Discord: https://discord.gg/z8wNYzb
Description
When setting defaultContentLanguageInSubdir: true
, 404 error at the website roots are not handled correctly because hugoblox doesn't generate a 404.html
at the root. Then it's the server 404 error page instead of hugoblox default one.
Reproduction Link
https://github.com/CravateRouge/CravateRouge.github.io
Steps to Reproduce
- Set
defaultContentLanguageInSubdir: true
inhugo.yaml
- Put all website content into
content\en
- Remove public folder and relaunch hugo server
- Access to a non existing page of the website e.g. example.com/blabla and you'll see the server error page instead of the hugoblox one
...
Expected Result
We should have the standard hugoblox 404 page:
Actual Result
We have the default 404 server page:
What Hugo Module versions does your site use?
module github.com/HugoBlox/theme-landing-page
go 1.19
require (
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20231108143325-448ed0e3bd2b
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240602133901-492e343c2a33
)
What operating system(s) are you seeing the problem on?
Windows, Android, iOS, Linux
What browser(s) are you seeing the problem on?
Firefox, Microsoft Edge
Which Hugo Blox template are you using?
Landing Page
What version of Hugo are you using?
0.126.3