gohugo-theme-ananke icon indicating copy to clipboard operation
gohugo-theme-ananke copied to clipboard

Main menu links are incorrect under certain circumstances

Open tamaracha opened this issue 2 years ago • 0 comments

Hi, I have a situation where links in the main navigation coming from config are not correct:

  • multilingual setup with defaultContentLanguageInSubdir
  • baseURL has a subdirectory
  • Most menu items come from frontmatter
  • A few menu items come from menus.main in config
  • hugo v0.109.0

For frontmatter menu items, your site_navigation template generates the correct links, because .URL is already the .RelPermalink. The URLs from manual config items are missing the language prefix and need a relLangURL or absLangURL pipe which prepends it.

tamaracha avatar Jan 21 '23 14:01 tamaracha