{{ define "main" }} {{ if or (eq .Section "post") (eq .Section "posts") (eq .Section "blog") (eq .Section "blogs") (eq .Section "news") (eq .Section "categories") (eq .Section "tags") }}
{{ with .Params.images }}
{{ range . }}
{{ end }}
{{ end }} {{ with .Params.tags }} {{ end }}

{{ .Title }}

{{ .Content }}
{{ $widget:= site.Params.widgets.sidebar }} {{- partial "widgets/widget-wrapper" ( dict "Widgets" $widget "Scope" . ) -}}

{{i18n "you_may_also_like"}}

{{ $related := ( where site.RegularPages "Type" "in" site.Params.mainSections ) | intersect (where site.Pages ".Title" "!=" .Title) | union (site.RegularPages.RelatedIndices . "tags" ) }} {{ range first 3 $related }}
{{ .Render "article" }}
{{ end }}
{{ else }}
{{ partial "page-header.html" . }}
{{.Content}}
{{ end }} {{ end }}