I found a lot of posts by people trying to get rid of trailing slashes, but I seem to have the opposite problem. The docs write the pageRef
property without trailing slash, as below:
menus.toml
[[nav]]
name = "Home"
pageRef = "/"
weight = 1
[[nav]]
name = "Press"
pageRef = "/press"
weight = 2
Template:
<li><a href="{{ .PageRef }}">{{ safe.HTML .Name }}</a></li>
Produces:
<li><a href="/press">Press</a></li>
I would have expected a trailing slash there, as with other links produced e.g. via .RelPermalink
. Am I mistaken in desiring that behavior? What do you recommend?