{{ $perm := .Permalink }} {{ $base := .Site.BaseURL }} {{ $logo := "img/bblogo.png" }} {{ $isHomePage := eq .Title .Site.Title }} {{ if .Params.subtitle }} {{ else }} {{ if .Summary }} {{ else }} {{ end }} {{ end }} {{ if .Keywords }} {{ else if .Params.tags }} {{ end }} {{ $thumb := $logo | absURL }} {{ $match := findRE `!\[(.*)\]\((.+).(jpg|png|gif)` .RawContent 1 }} {{ range $match }} {{ $relthumb := replaceRE `!\[(.*)\]\(` "" . }} {{ if hasPrefix $relthumb "/" }} {{ $thumb = printf "%s%s" $base $relthumb }} {{ else }} {{ $thumb = printf "%s%s" $perm $relthumb }} {{ end }} {{ end }} {{ if .Params.subtitle }} {{ else }} {{ end }} {{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" $perm) }} {{ if $related }} {{ range $related }} {{ end }} {{ end }} {{ with .Params.tags }}{{ range first 6 . }} {{ end }}{{ end }} {{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}