fix: use .GetPage to link contact page if contact.md exists

This commit is contained in:
Robert Kaussow 2021-01-03 23:11:06 +01:00
parent 2a1586e753
commit 3c0dbcc668
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61

View File

@ -7,10 +7,10 @@
<a href='{{ .Permalink | relURL }}' class="gblog-footer__link">Feed</a> <a href='{{ .Permalink | relURL }}' class="gblog-footer__link">Feed</a>
</span> </span>
{{ end }} {{ end }}
{{ if (fileExists "contact.md") }} {{ with .GetPage "contact.md" }}
<span class="gblog-footer__item"> <span class="gblog-footer__item">
<svg class="icon email"><use xlink:href="#email"></use></svg> <svg class="icon email"><use xlink:href="#email"></use></svg>
<a href='{{ "contact" | relURL }}' class="gblog-footer__link">Contact</a> <a href='{{ .Permalink | relURL }}' class="gblog-footer__link">Contact</a>
</span> </span>
{{ end }} {{ end }}
{{ with .Site.Params.GeekblogLegalNotice }} {{ with .Site.Params.GeekblogLegalNotice }}