{{ if .Site.Data.blog.staticmanComments.enable }}
{{ i18n "noComments" }}{{ i18n "comments" }}
{{ $postSlug := .File.BaseFileName }}
{{ $.Scratch.Add "entryId" $postSlug }}
{{ $.Scratch.Set "hasComments" 0 }}
{{ if .Site.Data.comments }}
{{ $comments := index $.Site.Data.comments ($.Scratch.Get "entryId") }}
{{ range $comments }}
{{ $.Scratch.Add "hasComments" 1 }}
{{ if not .reply_to }}
{{ $.Scratch.Set "parentId" ._id }}
{{ $.Scratch.Set "parentName" .name }}
{{ $.Scratch.Set "hasReplies" 0 }}
{{ .name }}