{{- $.Scratch.Set "isPost" false -}} {{- if .IsPage -}} {{- if eq .Type "posts" -}} {{- $.Scratch.Set "isPost" true -}} {{- end -}} {{- end -}} {{- if and (and ($.Scratch.Get "isPost") (lt .Site.Params.sidebarBehavior 3)) (or (and .Site.Params.clearReading (not .Params.clearReading)) .Params.clearReading) -}} {{- .Scratch.Set "sidebarBehavior" (add .Site.Params.sidebarBehavior 3) -}} {{- else -}} {{- .Scratch.Set "sidebarBehavior" .Site.Params.sidebarBehavior -}} {{- end -}} {{- if .Site.Author.gravatarEmail -}} {{- .Scratch.Set "gravatarEmail" .Site.Author.gravatarEmail -}} {{- end -}} {{- if .Site.Author.gravataremail -}} {{- .Scratch.Set "gravatarEmail" .Site.Author.gravataremail -}} {{- end -}} {{- if .Scratch.Get "gravatarEmail" -}} {{- .Scratch.Set "authorPicture" (printf "https://www.gravatar.com/avatar/%s" (urlize (md5 (.Scratch.Get "gravatarEmail")))) -}} {{- else if .Site.Author.picture -}} {{- .Scratch.Set "authorPicture" (absURL .Site.Author.picture) -}} {{- end -}} {{ partial "head_start.html" . }} {{ partial "schema.html" . }} {{ partial "meta.html" . }} {{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} {{ with .OutputFormats.Get "RSS" }} {{ end }} {{ with .Site.Author.googleplus }} {{ end }} {{ if .Site.Params.comment.gitalk.enable }} {{ end }} {{ range .Site.Params.customCSS }} {{ if isset . "href" }} {{ else }} {{ end }} {{ end }} {{ if or .Params.googleAnalytics.async .Params.ga.async }} {{ template "_internal/google_analytics_async.html" . }} {{ else }} {{ template "_internal/google_analytics.html" . }} {{ end }} {{ partial "head_end.html" . }}