HugoBlox/hugo-blox-builder

Default content not handled correctly with multilingual websites when defaultContentLanguageInSubdir enabled

Closed this issue · 1 comments

Preliminary Checks

Description

When setting defaultContentLanguageInSubdir: true, there are no permalinks automatically generated between the website root pages and the default content subdir pages.

Reproduction Link

https://github.com/CravateRouge/CravateRouge.github.io

Steps to Reproduce

  1. Set defaultContentLanguageInSubdir: true in hugo.yaml
  2. Put all website content into content\en
  3. Remove public folder and relaunch hugo server (empty browser cache to be sure it's pages served by the server and not the browser)
  4. Access to a resource as en\terms but from the website root: https://example.com/terms instead of the subdir https://example.com/en/terms
    ...

Expected Result

You should be redirected from https://example.com/terms to https://example.com/en/terms

Actual Result

You have a 404 error.

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, 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

This issue is stale because it has not had any recent activity. The resources of the project maintainers are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the main branch, consider contributing a Pull Request with a fix.

If this is a feature request, and you feel that it is still relevant and valuable, consider contributing a Pull Request for review.

This issue will automatically close soon if no further activity occurs. Thank you for your contributions.