{{- define "main" }} {{- $s := .Site.Params }} {{- $p := .Params }} {{- $scratch := newScratch }} {{- if isset $p "image" }} {{- $scratch.Set "image" $p.image }} {{- else }} {{ $scratch.Set "image" $s.fallBackOgImage }} {{- end }} {{- $image := $scratch.Get "image" }} {{- $bg := absLangURL (path.Join "images" $image) }}
{{- $t := .Title }}

{{ $t }}

{{- partial "post-meta" . }} {{- partial "image-feature" . }} {{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) ($s.toc) }}
{{ .TableOfContents }}
{{ end }}
{{- .Content }}
{{- $showRelatedInArticle := true }} {{- if eq $s.showRelatedInArticle false }} {{- $showRelatedInArticle = false }} {{- else if eq $p.showRelatedInArticle false }} {{- $showRelatedInArticle = false }} {{- end }} {{- if ne $showRelatedInArticle false }} {{- partial "related" . }} {{- end }} {{- $showComments := true }} {{- if eq $s.comments false }} {{- $showComments = false }} {{- else if eq $p.comments false }} {{- $showComments = false }} {{- end }} {{- if ne $showComments false }} {{- partial "comments" . }} {{- end }} {{- partial "i18nlist" . }}
{{- if ( ne $p.sidebar false ) }} {{- partial "sidebar" . }} {{ end }}
{{- end }}