Add func prefix to func templates

This commit is contained in:
Will Faught
2022-12-19 17:18:00 -08:00
parent 4d84560390
commit bd156f6251
6 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
{{ $title := "" }}
{{ $pageTitle := .Title | markdownify | plainify | htmlUnescape }}
{{ $siteTitle := .Site.Title | markdownify | plainify | htmlUnescape }}
{{ if and .Title .Site.Title }}
{{ if .IsHome }}
{{ $title = $pageTitle }}
{{ else }}
{{ $title = printf "%s · %s" $pageTitle $siteTitle }}
{{ end }}
{{ else if .Title }}
{{ $title = $pageTitle }}
{{ else if .Site.Title }}
{{ $title = $siteTitle }}
{{ end }}
{{ return $title }}