{{ define "main" }}
{{ if .Params.categories }} {{ range (.GetTerms "categories") }} {{ .LinkTitle }} {{ end }} {{ end }} {{ if .Site.Params.post_view }} {{ end }}

{{ .Title }}

{{ if .IsTranslated }}

{{ i18n "translations" }}

{{ end }} {{- $TOCEnabled := or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}} {{- $hasTOC := gt (len .TableOfContents) 32 -}} {{ if and $TOCEnabled $hasTOC -}}
{{ i18n "article.tableOfContents" }} {{ .TableOfContents }}
{{- end }}
{{ .Content }}
{{ if .Site.Params.post_like }}
{{ end }}
{{ range (.GetTerms "tags") }} {{ .LinkTitle }} {{ end }}
{{ if .Site.Params.showAuthor }}
{{ .Site.Params.authorName }}
{{ .Site.Params.authorDescription }}
{{ partial "sns.html" . }}
{{ end }} {{ partial "category.html" . }} {{ partial "related.html" . }} {{ if .Params.twitter }} {{ end }} {{ if .Params.story_id }} {{ partial "commentlist.html" . }} {{ end }} {{ partial "twikoo.html" . }}
{{ end }}