HUGO

Hugo how to set custom css id

Hi,
I’ve a collapse shortcode where ı am using as below.I would like to add deeplink to related title thus i need to set css id.

{{< collapse title="Does oneAPI support team approve subscriptions or provide API specific information items?" >}} 
lorem ipsum ….
{{< /collapse >}}

the output of {{ print (.Get "title") }} is href="#Does%20oneAPI%20support%20team%20approve%20subscriptions%20or%20provide%20API%20specific%20information%20items%3f"

How can I achieve the results where href needs to be like href="#does-oneapi-support-team-approve-subscriptions-or-provide-api-specific-information-items?

Either of these:

{{ anchorize (.Get "title") }}
{{ .Get "title" | anchorize }}

thanks @jmooring

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.