theNewDynamic / gohugo-theme-ananke

Ananke: A theme for Hugo Sites

Home Page:https://gohugo-ananke-theme-demo.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Main menu links are incorrect under certain circumstances

tamaracha opened this issue · 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.