{{ $currentTitle := .Title | emojify }} {{ $mainTitle := .Params.mainTitle | emojify }} {{ $titleSeparator := .Site.Params.titleSeparator }} {{ if (eq .Kind "404") }} {{ $currentTitle = .Site.Params.notFound.title | emojify | default .Site.Data.default.notFound.title }} {{ else if (eq .Kind "section") }} {{ if gt .Paginator.TotalPages 1 }} {{ $mainTitle = printf `%s, %s %s %s %s` .Title (T "page") (string .Paginator.PageNumber) (T "of") (string .Paginator.TotalPages) }} {{ end }} {{ else if eq .Kind "term" }} {{ $currentTerm := "" }} {{ if eq .Type "tags" }} {{ $currentTerm = (T "tag") }} {{ else }} {{ $currentTerm = (T "category") }} {{ end }} {{ $currentTitle = printf `%s: "%s"` $currentTerm .Title }} {{ with .Paginator }} {{ if gt .TotalPages 1 }} {{ $mainTitle = printf `%s: "%s", %s %s %s %s` $currentTerm $.Title (T "page") (string .PageNumber) (T "of") (string .TotalPages) }} {{ else }} {{ $mainTitle = printf `%s: "%s"` $currentTerm $.Title }} {{ end }} {{ end }} {{ else if eq .Kind "taxonomy" }} {{ if eq .Type "tags" }} {{ $currentTitle = (T "tags") }} {{ else }} {{ $currentTitle = (T "categories") }} {{ end }} {{ else if and (.IsHome) (not .Content) }} {{ $currentTitle = .Site.Title | emojify }} {{ end }} {{ $currentDesc := .Params.Description | emojify }} {{ if .IsHome }} {{ $currentDesc = .Site.Params.description | emojify }} {{ else if and (ne .Kind "taxonomy") (eq .Type "tags") (not .Params.description) }} {{ $currentDesc = (T "postsUnderTag" .) }} {{ else if and (ne .Kind "taxonomy") (eq .Type "categories") (not .Params.description) }} {{ $currentDesc = (T "postsUnderCategory" .) }} {{ else if eq .Kind "taxonomy" }} {{ $currentDesc = printf `%s %s.` (T "pageContaining") ($currentTitle | lower) }} {{ else if (eq .Kind "404") }} {{ $currentDesc = .Site.Params.notFound.description | emojify | default .Site.Data.default.notFound.description }} {{ end }} {{ .Scratch.Set "currentTitle" $currentTitle }} {{- if and $titleSeparator (not .Params.disableTitleSeparator ) -}} {{ if $mainTitle }} {{- $mainTitle = printf `%s %s %s` $mainTitle $titleSeparator .Site.Title -}} {{ else }} {{- $mainTitle = printf `%s %s %s` $currentTitle $titleSeparator .Site.Title -}} {{ end }} {{- end -}} {{- if $mainTitle -}} {{- $mainTitle -}} {{ else }} {{- $currentTitle -}} {{- end -}} {{ with .Site.Params.author }}{{ end }} {{ with $currentDesc }}{{ end }} {{ if and (.IsPage) (not .Params.sitemapExclude) }} {{ if .Params.canonicalURL }} {{ else if and (ne .Kind "404") (ne .Params.sitemapExclude true) }} {{ end }} {{ else if (eq .Kind "section") }} {{ if .Paginator.HasPrev }} {{ end }} {{ if .Paginator.HasNext }} {{ end }} {{ end }} {{ if (templates.Exists "partials/custom/head-append.html") }} {{ partial "custom/head-append" . }} {{ end }} {{ with $currentDesc }}{{ end }} {{- if ne .Kind "404" }} {{ end -}} {{ $highRes := .Site.Params.imageProc.highRes | default .Site.Data.default.imageProc.highRes }} {{ $imgPath := .Page.Param "imgPath" }} {{- if .Params.cover }} {{ $file := .Params.cover }} {{ if $imgPath }} {{ $file = path.Join $imgPath $file }} {{ end }} {{- with .Resources.GetMatch $file }} {{ with $.Params.coverAlt }} {{ end }} {{ if and (in $.Site.Params.mainSections $.Section) (not .Params.sitemapExclude) }} {{ $.Scratch.Set "schemaCover" (slice ((.Fill "1280x640").Permalink) ((.Fill "1200x630").Permalink) ((.Resize (index $highRes 0)).Permalink)) }} {{ end }} {{ end -}} {{ else if .Site.Params.cover }} {{ with resources.Get (.Site.Params.cover | default "img/cover.jpg") }} {{ with $.Site.Params.coverAlt }} {{ end }} {{ if and (in $.Site.Params.mainSections $.Section) (not .Params.sitemapExclude) }} {{ $.Scratch.Set "schemaCover" (slice ((.Fill "1280x640").Permalink) ((.Fill "1200x630").Permalink) ((.Resize (index $highRes 0)).Permalink)) }} {{ end }} {{ end }} {{ end -}} {{ if and (in .Site.Params.mainSections .Section) (.IsPage) (not .Params.sitemapExclude) }} {{ if not .Date.IsZero }} {{ end }} {{ with .Params.author }} {{ end }} {{ with .Site.Params.Social.Centralized.twitter }} {{ end}} {{ else }} {{ end -}} {{ with .Site.Params.Social.Centralized.twitter }} {{ end }} {{ with .Site.Params.locale }} {{ end }} {{ if .Site.Config.Privacy.Twitter.EnableDNT }} {{ end }} {{ with .OutputFormats.Get "RSS" }} {{ end }} {{ if .IsTranslated }} {{ range .Translations }} {{ end }} {{ end }} {{- $centralized := .Site.Params.Social.Centralized -}} {{- $decentralized := .Site.Params.Social.Decentralized -}} {{- $sameAs := slice -}} {{ if .Site.Params.Social }} {{ range .Site.Data.social }} {{ $currentEntry := .entry }} {{ $currentBase := .base }} {{ if not .decentralized }} {{ with (index $centralized $currentEntry) }} {{ $sameAs = $sameAs | append (printf "%s%s" $currentBase (index . 0)) }} {{ end }} {{ else }} {{ if (index $decentralized $currentEntry) }} {{ range (index $decentralized $currentEntry) }} {{ $sameAs = $sameAs | append (index . 0) }} {{ end }} {{ end }} {{ end }} {{ end }} {{ end }} {{ if and (in .Site.Params.mainSections .Section) (.IsPage) (not .Params.sitemapExclude) }} {{ else }} {{ end }} {{ partialCached "head-style" . }} {{ partialCached "font-preload" . }} {{ if or .Params.katex .Site.Params.katex .Params.math .Site.Params.math }} {{ partialCached "katex-font-preload" . }} {{ end }} {{ if eq .Layout "search" }} {{ end }} {{- range $sameAs -}} {{ end -}} {{ $mainJS := resources.Get "js/main.js" | resources.ExecuteAsTemplate "js/main.js" . | minify | fingerprint }} {{ if ge hugo.Version "0.74" }} {{ $mainJS = resources.Get "js/main.js" | resources.ExecuteAsTemplate "js/main.js" . | js.Build (dict "minify" "true") | fingerprint }} {{ end }}