Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of .RelPermalink brokes the multilingual host functionality #655

Closed
wants to merge 1 commit into from

Conversation

ricard2k
Copy link

@ricard2k ricard2k commented Oct 1, 2023

https://gohugo.io/content-management/multilingual/#configure-multilingual-multihost

this functionality needs to create the language links with .Permalink

@netlify
Copy link

netlify bot commented Oct 1, 2023

Deploy Preview for gohugo-ananke-theme-demo canceled.

Name Link
🔨 Latest commit 207fa66
🔍 Latest deploy log https://app.netlify.com/sites/gohugo-ananke-theme-demo/deploys/6519be55e42b4b0008d376b8

@ricard2k ricard2k marked this pull request as draft October 1, 2023 19:01
@ricard2k ricard2k marked this pull request as ready for review October 1, 2023 19:34
@ricard2k ricard2k changed the title use os .RelPermalink brokes the multilingual host functionality Use of .RelPermalink brokes the multilingual host functionality Oct 1, 2023
@ricard2k
Copy link
Author

ricard2k commented Oct 1, 2023

You can see the patch working in:
https://little-railways.com
https://little-railways.es

Copy link
Member

@regisphilibert regisphilibert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ricard2k and thank you for this.

I understand the motivation but I don't think we should enforce .Permalink for everyone for such an edge-case.

I'm not sure there is a way to know if the current project is multi host, but if there is, we should test that before using .Permalink here rather than .RelPermalink.

If this test is not possible then we should add a global boolean setting to the theme localizationMultiHost(for example) and test it instead.

Of course the latter would require an addition to the read me.

Thanks a ton!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants