{{- define "bodytag" -}} {{- end -}} {{- define "main" -}}

{{ .Title }}

{{with .Params.youtubeid}}
{{- else -}}
{{- $img := .Resources.GetMatch "*featured*" -}} {{- $permalink := .Permalink -}} {{- with $img -}} {{- $medium := .Resize "1200x" -}}
{{- end -}} {{- $caption := .Params.featuredcaption -}} {{- with $caption -}}

{{$caption}}

{{- end -}}
{{- end -}}
{{- .Content -}}
{{- partial "blog/author-box" . -}}

{{T "published"}}: , {{ .WordCount }} {{T "words"}}.

{{T "share"}}

{{- $related := newScratch -}} {{- $related.Set "related" 0 -}} {{- $page_link := .Permalink -}} {{- $categories := .Params.categories -}} {{- range $page := where .Site.Pages.ByDate.Reverse "Section" "blog" -}} {{- $has_common_categories := intersect $categories .Params.categories | len | lt 0 -}} {{- if and $has_common_categories (ne $page_link $page.Permalink) (lt ($.Scratch.Get "$c") 5) -}} {{- $.Scratch.Add "$c" 1 -}} {{- if (eq ($.Scratch.Get "$c") 1) -}} {{- $related.Set "related" 1 -}} {{- end -}}
{{- if .NextInSection -}} {{T "next"}}
{{.NextInSection.Title}}
{{- end -}} {{- if .PrevInSection -}} {{T "previous"}}
{{.PrevInSection.Title}}
{{- end -}}
{{- end -}} {{- define "bodyclose" -}} {{- end -}}