This commit is contained in:
parent
b2ea7d9708
commit
bae1ad5c41
2 changed files with 18 additions and 14 deletions
|
|
@ -2,15 +2,17 @@
|
|||
|
||||
{{ $slug := replace .URL "/" "" }}
|
||||
|
||||
{{ $comments := index $.Site.Data.comments $slug }}
|
||||
{{ if $comments }}
|
||||
{{ if gt (len $comments) 1 }}
|
||||
<h3>{{ len $comments }} {{ i18n "moreComment" }}</h3>
|
||||
{{ if .Site.Data.comments }}
|
||||
{{ $comments := index $.Site.Data.comments $slug }}
|
||||
{{ if $comments }}
|
||||
{{ if gt (len $comments) 1 }}
|
||||
<h3>{{ len $comments }} {{ i18n "moreComment" }}</h3>
|
||||
{{ else }}
|
||||
<h3>{{ len $comments }} {{ i18n "oneComment" }}</h3>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<h3>{{ len $comments }} {{ i18n "oneComment" }}</h3>
|
||||
<h3>{{ i18n "noComment" }}</h3>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<h3>{{ i18n "noComment" }}</h3>
|
||||
{{ end }}
|
||||
|
||||
{{ $.Scratch.Set "hasComments" 0 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue