{{ define "main" }}

{{ .Title }}

{{ partial "partials/components/post-meta.html" . }} {{ $is_toc := cond (ne .Params.toc nil) .Params.toc $.Site.Params.toc }} {{ if (and $is_toc (gt (countrunes .TableOfContents) 0)) }} {{ .TableOfContents }} {{ end }}
{{ .Content }}

{{- with .Params.author }} {{- $names := slice }} {{- range . }}{{ $names = $names | append .name }}{{ end }}

{{ i18n "published_by" }}: {{ delimit $names ", " (printf " %s " (i18n "and")) }}

{{- end }} {{- if ne (.PublishDate.Format "2006") "0001" -}}

{{ i18n "published_on" }}:

{{- end }} {{- if ne .Date .Lastmod }}

{{ i18n "updated_on" }}:

{{- end }} {{- if .IsTranslated }} {{- $lang_links := slice }} {{- $langs := slice }} {{- range .Translations }} {{- $lang := cond (ne .Language.LanguageName nil) .Language.LanguageName .Lang }} {{ $lang_links = $lang_links | append (printf "%s" .Permalink $lang) }} {{ $langs = $langs | append $lang }} {{- end }}

{{ i18n "available_translations" }}: {{ delimit $lang_links "," (printf " %s " (i18n "and")) }}

{{- end }}
{{ end }}