Skip to content

Commit

Permalink
fix: display word count with i18n enabled (#89)
Browse files Browse the repository at this point in the history
Remove .Wordcount from i18n to layouts. Fix for  #88
  • Loading branch information
1bl4z3r authored Oct 3, 2024
2 parents 7906cd4 + 7f36080 commit 51beaa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/posts_single_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{- with .Params.categories }}
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_categories") -}}{{- range . -}}<span class="category"><a href="{{ "categories/" | absLangURL }}{{ . | urlize }}">{{.}}</a></span>{{- end }}</p>
{{- end }}
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_wordcount") }}{{- if fileExists "i18n" -}} {{ i18n "wordCount" . -}} {{- else -}} {{ .WordCount }} Words {{- end -}} {{- partial "readTime.html" . -}}</p>
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_wordcount") }}{{ .WordCount }} {{ if fileExists "i18n" -}} {{ i18n "wordCount" . -}} {{- else -}} Words {{- end -}} {{- partial "readTime.html" . -}}</p>
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_date") }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local -}}
{{- if and (not (eq .Page.Params.ShowLastmod nil)) (.Page.Params.ShowLastmod) -}}
{{- if and .GitInfo .Site.Params.gitUrl -}}
Expand Down

0 comments on commit 51beaa3

Please sign in to comment.