Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation links incompatible with relativeURLs set to true #148

Closed
LongLiveCHIEF opened this issue Sep 18, 2020 · 0 comments · Fixed by #149
Closed

Navigation links incompatible with relativeURLs set to true #148

LongLiveCHIEF opened this issue Sep 18, 2020 · 0 comments · Fixed by #149

Comments

@LongLiveCHIEF
Copy link
Contributor

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>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant