Trying to inject `{{` in email URL

I’m trying to build html email templates for Netlify’s identify consumption.

Netlify Identity lets you customize the emails it sends to users by hosting those files yourself and pointing Netlify to them.
Ideally I’d like Hugo to be able to generate those files with some simple Front Matter added to content files.

But to this day, I’m unable to inject the curly bracketed variables required by Netlify inside a href attribute. I’m trying to put this string: http://mysite.com/cms/#email_change_token={{ .Token }}

I’ve tried all the safe functions I know including htmlUnescape but none will work.

href="http://mysite.com/cms/#email_change_token={{ print `{{ .Token }}` }}

I even tried wrapping the whole string in a print:

{{ print `http://mysite.com/cms/#email_change_token=` `{{ .Token }}` | safeJS }}

it will systematically print

href="http://mysite.com/cms/#email_change_token=%7b%7b%20.Token%20%7d%7d"

Has anybody done work with curly brackets inside href attributes?

Use printf.

Producing a different escaping, but still escaping somehow. I’ve created a repo for tests.

I managed by including part of the tag in the print statement:

    {{ print `<a href="http://mysite.com/cms/#email_change_token={{ .Token }}" ` | safeHTML }}
      class="text-lg bg-blue-500">
      Click Here
    </a>

It’s fine but I wonder if there’s a better way.