{{ 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 }}

{{ $timeFmt := "2006-01-02 15:04:05 -0700" }}
{{- with .Params.author }} {{- $names := slice }} {{- range . }}{{ $names = $names | append .name }}{{ end }}

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

{{- end -}} {{- /* Only show the creation date if the `date` field is valid. */ -}} {{- if ne (.PublishDate.Format "2006") "0001" -}}

Published:

{{- end }} {{- /* Publication date */ -}} {{- if and (ne (.Date.Format "2006") "0001") (ne .Date .PublishDate) -}}

Created:

{{- end }} {{- /* Modification date (will only appear if the publication date is less than the modified date.) */ -}} {{- if ne .Date .Lastmod }}

{{ i18n "updated_on" }}:

{{- end }} {{- /* Link the translated versions if the article has at least one translated page. */ -}} {{- 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 }} {{- with .Params.tags }} {{- $tags := slice }} {{- range $index, $tag := . }} {{- $tag := printf `%s` ("/tags" | relLangURL) ($tag | urlize) $tag }} {{- $tags = $tags | append $tag }} {{- end }}

Topic: {{ delimit $tags "." }}

{{- end -}} {{- with .GitInfo }}

Hash: {{ .Hash }}

{{- end -}}
{{ end }}