{{ $.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 }}