{{ define "header" }} {{/* We can override any block in the baseof file be defining it in the template */}} {{ partials.Include "page-header.html" . }} {{ end }} {{ define "main" }} {{- $related_content := .RegularPages.Related . -}} {{- $needs_aside := or .Params.toc $related_content -}} {{ $page := .}} {{ $section := .Site.GetPage "section" .Section }}
{{- partials.IncludeCached "social/share.html" . . -}}

{{- .Title -}}

{{ with .Params.author | compare.Default .Site.Params.author }}

{{- if compare.Eq $page.Language "de" "en" "es" "fr" "it" "no" "pt" -}} {{- lang.Translate "by" -}} {{ end -}} {{- if reflect.IsSlice . -}} {{ collections.Delimit . ", " | transform.Markdownify }} {{- else -}} {{ . | transform.Markdownify }} {{- end -}}

{{ end }} {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}} {{ if not .Date.IsZero }} {{end}} {{/* Show "reading time" and "word count" but only if one of the following are true: 1) A global config `params` value is set `show_reading_time = true` 2) A section front matter value is set `show_reading_time = true` 3) A page front matter value is set `show_reading_time = true` */}} {{ if (or (compare.Eq (.Param "show_reading_time") true) (compare.Eq $section.Params.show_reading_time true) )}} {{ $readingTime := .ReadingTime }} {{ with .Site.Params.reading_speed }} {{ $readingTime = div (float $.WordCount) . }} {{ $readingTime = math.Ceil $readingTime }} {{ $readingTime = int $readingTime }} {{ end }} - {{ lang.Translate "readingTime" $readingTime }} - {{ lang.Translate "wordCount" .WordCount }} {{ end }}
{{- .Content -}} {{- partials.Include "tags.html" . -}}
{{ if .Site.Config.Services.Disqus.Shortname }} {{/* former internal template */}} {{ partial "disqus.html" . }} {{ end }} {{ if .Site.Params.commentoEnable }} {{- partials.Include "commento.html" . -}} {{ end }}
{{- if $needs_aside -}} {{- end -}}
{{ end }}