{{- $isPost := eq .Section "post" -}}
{{- $perm := .Permalink -}}
{{- $base := .Site.BaseURL -}}
{{- $logo := "img/bblogo.png" -}}
{{- $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 -}}
{{- $description := printf "%s | %s" .Site.Title .Site.Params.description -}}
{{- if .Params.subtitle -}}
{{- $description = .Params.subtitle -}}
{{- else if .Summary -}}
{{- $description = .Summary | safeHTML | truncate 100 -}}
{{- end -}}
{{ with .Params.tags }}
{{ range . }}
{{- end -}}
{{- end -}}
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" -}}