-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Closed
Copy link
Description
There is a bug in non-content menu implementation that results in a broken link to a file if a relative URL is used in a config file menu entry. For example, if the config.toml file looks as follows:
baseurl = "http://my_site.com"
CanonifyUrls = true
[[menu.extramedia]]
name = "Presentation: Three Steps to Enrollment"
url = "/media/enrollment-sessions.ppt"
weight = -120
identifier = "PowerPoint"
the rendered link to the .ppt file looks like
http://my_site.com/media/enrollment-sessions/index.ppt/
However, if the absolute URL is used instead of the relative one, the resulting URL is OK. i.e.
baseurl = "http://my_site.com"
CanonifyUrls = true
[[menu.extramedia]]
name = "Presentation: Three Steps to Enrollment"
url = "http://my_site.com/media/enrollment-sessions.ppt"
weight = -120
identifier = "PowerPoint"
renders to
http://my_site.com/media/enrollment-sessions.ppt/
Related thread in Hugo Discussion is here.