Using anchor with relref in i18n context

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 set defaultContentLanguageInSubdir= true
defaultContentLanguageInSubdir= true

title = "Documentation for Hugo Learn Theme"
weight = 1
languageName = "English"

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 and, one for each language
  • I have pages like basics/configuration/ (Configuration page for english language)

I’m able to reference the page with {{%relref "basics/configuration/" %}} from homepage (it references automatically the right language)
But I’m totally unable to reference an anchor in this basics/configuration/ from homepage

I tried:

  • {{%relref "basics/configuration/" %}} -> Link is empty
  • {{%relref "basics/configuration/" %}} -> Page not found
  • {{%relref "basics/" %}} -> 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/" %}} from homepage

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