Create a absURL to a bookmark

May be you can play around this :

no # in your json/href

"button" : {
              "text" : "Scegli",
              "href" : "contact"
            }
{{ $anchor := printf "%s%s" "#" (anchorize .button.href) }}
<a href="{{ $anchor | relURL }}" class="btn btn-outline-dark mt-4">{{ .button.text }}</a>

And for anchor links, I guess using absURL doesn’t make real sense (see absURL function seems to eat HTML anchor-links)

1 Like