{{ define "main" }}
{{ .Content }} {{ if .Params.tags }}
{{ range .Params.tags }} {{ . }}  {{ end }}
{{ end }} {{ if $.Param "socialShare" }}
{{ end }} {{ if .Site.Params.showRelatedPosts }} {{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} {{ $.Scratch.Set "has_related" true }} {{ end }} {{ if $.Scratch.Get "has_related" }}

{{ i18n "seeAlso" }}

    {{ $num_to_show := .Site.Params.related_content_limit | default 5 }} {{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
  • {{ .Title }}
  • {{ end }}
{{ end }} {{ end }}
{{ if ne .Type "page" }} {{ end }} {{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (and .Site.Params.comments (ne .Type "page"))) }} {{ partial "remark42.html" . }} {{ if .Site.DisqusShortname }} {{ if .Site.Params.delayDisqus }}
{{ else }}
{{ template "_internal/disqus.html" . }}
{{ end }} {{ end }} {{ if .Site.Params.staticman }}
{{ partial "staticman-comments.html" . }}
{{ end }} {{ end }}
{{ end }}