gethugothemes / dot-hugo

Dot - Hugo Documentation Theme
https://gethugothemes.com/products/dot/?utm_source=dot_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
261 stars 148 forks source link

Navigation links incompatible with relativeURLs set to true #148

Closed LongLiveCHIEF closed 4 years ago

LongLiveCHIEF commented 4 years ago

The gitlab pages rendering of hugo assets requires that the relativeURLs be set to true in config.toml. I've discovered that if you are using a non-root context as your baseURL, then no matter what path you pass to the navigation links, it will construct the wrong url and result in a 404.

Example:

baseURL = "https://examplesite.com/dot/"
relativeURLs = true

# Dropdown menu
[[Languages.en.menu.main]]
weight = 4
name = "docs"
hasChildren = true

  [[Languages.en.menu.main]]
  parent = "docs"
  name = "Installation"
  url = "installation"
  weight = 1

  [[Languages.en.menu.main]]
  parent = "docs"
  name = "Billing and Pricing"
  url = "billing-pricing"
  weight = 2

  [[Languages.en.menu.main]]
  parent = "docs"
  name = "Features"
  url = "features"
  weight = 3

This will result in the navigation url's resolving to /dot/dot/<url> or even /dot/dot/dot/<url>.