Hello everyone,
I’m creator of Hugo Learn Theme and I face a problem while creating documentation for the V2 of the theme.
The new version of the Learn theme will provide native support for multi-language. Therefore, I’m currently rewriting documentation of the theme in two languages (English and French).
In this context:
- I have defined the languages in my
config.toml
and setdefaultContentLanguageInSubdir= true
defaultContentLanguageInSubdir= true
[Languages]
[Languages.en]
title = "Documentation for Hugo Learn Theme"
weight = 1
languageName = "English"
[Languages.fr]
title = "Documentation du thème Hugo Learn"
weight = 2
languageName = "Français"
- My pages are rendered correctly with the two languages
- I have two homepages named
_index.en.md
and_index.fr.md
, one for each language - I have pages like
basics/configuration/_index.en.md
(Configuration page for english language)
I’m able to reference the page with {{%relref "basics/configuration/_index.md" %}}
from homepage _index.en.md
(it references automatically the right language)
But I’m totally unable to reference an anchor in this basics/configuration/_index.en.md
from homepage _index.en.md
.
I tried:
-
{{%relref "basics/configuration/_index.md#anchorname" %}}
-> Link is empty -
{{%relref "basics/configuration/_index.en.md#anchorname" %}}
-> Page not found -
{{%relref "basics/configuration.md#anchorname" %}}
-> Page not found -
{{%relref "basics/configuration#anchorname" %}}
-> Page not found
Note that refering non i18n pages with anchors from homepage is working. Ex: {{%relref "cont/markdown.md#anchorname" %}}
from homepage _index.en.md
Do you have any idea on how I could do that ? Is it a bug ?
Hugo version : Hugo Static Site Generator v0.26-DEV darwin/amd64 BuildDate: 2017-07-22T14:45:10+02:00