add word count

This commit is contained in:
Yupeng Chen 2024-04-26 11:13:08 +08:00
parent 7c4ffd539d
commit 40e28976f0
No known key found for this signature in database
GPG Key ID: BB03A97DB67D4C16
5 changed files with 19 additions and 18 deletions

View File

@ -33,6 +33,8 @@ article:
one: "{{ .Count }} minute read"
other: "{{ .Count }} minutes read"
wordCount: "{{ .Count}} words in total"
license:
other: "Licensed under: "

View File

@ -8,7 +8,7 @@ article:
relatedContent: 相关文章
lastUpdatedOn: 最后更新于
readingTime: "阅读时长: {{ .Count }} 分钟"
wordCount: "字数: {{ .Count }}"
license:
other: 许可证:

View File

@ -16,6 +16,7 @@ article:
tableOfContents: 目錄
relatedContent: 相關內容
lastUpdatedOn: 上次改過於
wordCount: "字數: {{ .Count }}"
readingTime:
one: "需要 {{ .Count }} 分鐘閱讀"
other: "需要 {{ .Count }} 分鐘閱讀"

View File

@ -15,9 +15,12 @@ list:
other: 小節
article:
back:
other: 返回
back: 返回
tableOfContents: 目錄
relatedContent: 相關文章
lastUpdatedOn: 最後更新
readingTime: "閱讀時間: {{ .Count }} 分鐘"
wordCount: "字數: {{ .Count }}"
section:
other: 段落
@ -25,17 +28,6 @@ article:
one: 小節
other: 小節
article:
back: 返回
tableOfContents: 目錄
relatedContent: 相關文章
lastUpdatedOn: 最後更新
readingTime: "閱讀時間: {{ .Count }} 分鐘"
readingTime:
one: "閱讀時間: {{ .Count }} 分鐘"
other: "閱讀時間: {{ .Count }} 分鐘"
notFound:
title:
other: 404 錯誤
@ -48,9 +40,6 @@ widget:
title: 紀錄
more: 更多
more:
other: 更多
tagCloud:
title:
other: 標籤雲

View File

@ -45,6 +45,15 @@
</time>
</div>
{{ end }}
<!-- word count -->
<div>
<!-- {{partial "helper/icon" "clock"}} -->
<time class="article-time--wordcount">
<!-- {{ .WordCount }} -->
{{ T "article.wordCount" .WordCount }}
</time>
</div>
</footer>
{{ end }}