{{ $.Scratch.Set "isPost" false }} {{ if .IsPage }} {{ if eq .Type "post" }} {{ $.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 "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 .Site.Author.gravatarEmail))) }} {{ else if .Site.Author.picture }} {{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }} {{ end }} {{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }} {{ with .RSSLink }} {{ end }} {{ with .Site.Author.twitter }} {{ end }} {{ with .Site.Params.fbAppId }} {{ end }} {{ with .Site.Params.fbAdminIds }} {{ range . }} {{ end }} {{ end }} {{ if .Site.Author.gravatarEmail }} {{ else if .Site.Author.picture }} {{ end }} {{ with .Params.thumbnailImage }} {{ end }} {{ with .Params.coverImage }} {{ end }} {{ with .Params.gallery }} {{ range . }} {{ end }} {{ end }} {{ with .Site.Author.googlePlus }} {{ end }} {{ if .Params.ga.async }} {{ template "_internal/google_analytics_async.html" . }} {{ else }} {{ template "_internal/google_analytics.html" . }} {{ end }}