Nevermind, I get an error for this. I believe my error is in defining for which page I want head2 to load. I thought I could do it with the pages’ title, but not happening.
You still need the eq function in your case, but don’t forget if you do not set title in the front matter of page the value will be <nil>, so the head1.html will render.
{{ if eq $.Params.title "Thank You" }}
{{ partial "head2.html" . }}
{{ else }}
{{ partial "head1.html" . }}
{{ end }}