Conditional Statement Not Being Hit in Anchor Tag?

I’m trying to add target="_blank" to one of the links in my menu if it’s a certain link. But, my conditional doesn’t seem to be working. Here’s the code:

<a class="nav-link p-0" href="{{.RelPermalink}}" {{- if eq "Skills Reference" .Params.Title}}target="_blank" {{end}}><h6>{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}{{- if eq "Skills Reference" .Params.Title}}<i id="skills-ref-external-icon" class="fas fa-external-link-alt"></i>{{end}}</h6>

Note that the second {{if}}, inside the <i> tag, works just fine.

Any ideas?

What HTML is rendered from that? What did you expect the output to be?

This seems to be working now. I wasn’t seeing the target attribute being rendered in the HTML on the page, but the link opens in a new tab as expected.