Hi,
I’m trying to link to a page anchor defined in my config.toml
which results in a relative link.
In my config.toml
i have:
[languages.en.params.navigation_button]
enable = true
label = "Contact us"
link = "#contact"
and on my header I have (in the header.html
partial of my theme):
{{ if site.Params.navigation_button.enable }}
{{ with site.Params.navigation_button }}
<a href="{{ .link | relURL }}" class="btn btn-sm btn-primary ml-3">{{ .label }}</a>
{{ end }}
{{ end }}
However, in the end, no matter which sub-page I am on the contact button will alwas link to $TOPLEVEL.com/#contact
and not to, for example "TOPLEVEL.com/about-us#contact
.
What could I do to achieve that?
thanks!