1
Fork 0

Add UTM referral to unsplash links

This commit is contained in:
Jake Howard 2022-06-21 22:46:31 +01:00
parent e8a8fb2b7a
commit 0b7cd84485
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -8,9 +8,11 @@
{{ partial "comments.html" . }} {{ partial "comments.html" . }}
{{ partial "related-content.html" . }} {{ partial "related-content.html" . }}
{{ $unsplash_utm := (printf "utm_source=%s&utm_medium=referral" (lower .Site.Params.author)) }}
{{ with .Scratch.Get "unsplash_data" }} {{ with .Scratch.Get "unsplash_data" }}
<div class="container text-center my-4"> <div class="container text-center my-4">
<small><a href="#header">Header</a> photo by <a href="{{ .user.links.html }}">{{ .user.name }}</a> on <a href="{{ .links.html }}">Unsplash</a>.</small> <small><a href="#header">Header</a> photo by <a href="{{ .user.links.html }}?{{ $unsplash_utm }}">{{ .user.name }}</a> on <a href="{{ .links.html }}?{{ $unsplash_utm }}">Unsplash</a>.</small>
</div> </div>
{{ end }} {{ end }}
</div> </div>