Closed adityatelange closed 2 years ago
cc: @moorereason Sorry for tagging, can you please take a look ?
What happens if you use absLangURL
on the stylesheet URL?
{{ $stylesheet.Permalink | absLangURL }}
What happens if you use
absLangURL
on the stylesheet URL?
{{ $stylesheet.Permalink | absLangURL }}
@davidsneighbour same results
So we keep tagging @moorereason ;)
This is a question for @bep. Like 90% of everything in Hugo, he wrote all of the multilingual and resources code.
A work-around would be to pass a relative link to absLangURL
. If absLangURL
is passed an absolute link (with a https://
prefix), it simply returns the input (we should be mentioned in the docs). Try this:
{{ $stylesheet.RelPermalink | absLangURL }}
This is a question for @bep. Like 90% of everything in Hugo, he wrote all of the multilingual and resources code.
A work-around would be to pass a relative link to
absLangURL
. IfabsLangURL
is passed an absolute link (with ahttps://
prefix), it simply returns the input (we should be mentioned in the docs). Try this:{{ $stylesheet.RelPermalink | absLangURL }}
Thank you ! That works :)
But shouldn't it be generating it with .Permalink
way ? as all other media like images in page bundles, links, pagination works perfectly fine with only .Permalink
.
But shouldn't it be generating it with
.Permalink
way ? as all other media like images in page bundles, links, pagination works perfectly fine with only.Permalink
.
@moorereason @davidsneighbour Any updates on this ? Is it a bug or it is working as intended ? :thinking:
This is a question for @bep. Like 90% of everything in Hugo, he wrote all of the multilingual and resources code.
A work-around would be to pass a relative link to
absLangURL
. IfabsLangURL
is passed an absolute link (with ahttps://
prefix), it simply returns the input (we should be mentioned in the docs). Try this:{{ $stylesheet.RelPermalink | absLangURL }}
Update: This does not work when there is only one baseURL
in multilingual site, but works on configs with specific baseURL
defined for each language.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Hi @bep
This issue is still reproducible. Requesting you to please look into this.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What version of Hugo are you using (
hugo version
)?v0.80.0
Does this issue reproduce with the latest release?
Yes
Reading https://gohugo.io/content-management/multilingual/ and setting up config like mentioned here
config.yml:
Code snippet used by Papermod to generate links: https://github.com/adityatelange/hugo-PaperMod/blob/5d6de5ecb1febac645b56cca7596ad0ce2ab9054/layouts/partials/head.html#L24-L36
Output
I can observe that urls aren't generated the way they should be a/c to docs
This Issue was from https://github.com/adityatelange/hugo-PaperMod/issues/126
Am I missing something ? Please let me know if anything is wrong on my end :)