Skip to content

Commit

Permalink
add reading time yoshiharuyamashita#89
Browse files Browse the repository at this point in the history
  • Loading branch information
dwy6626 committed Aug 15, 2020
1 parent aead47d commit 2074dd5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
["Read more"]
other = "Read more"

[ReadingTime]
other = "{{ .Count }} min."

[ReadAbout]
other = "more about me"

Expand Down
3 changes: 3 additions & 0 deletions i18n/zh.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
["Read more"]
other = "繼續閱讀"

[ReadingTime]
other = "{{ .Count }} 分鐘"

[ReadAbout]
other = "更多關於我"

Expand Down
10 changes: 9 additions & 1 deletion layouts/partials/post_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,12 @@
{{ end }}
{{ end }}

</div>

{{ if .Site.Params.ReadingTime }}
<div>
<i class="fas fa-clock"></i>
{{ i18n "ReadingTime" .ReadingTime }}
</div>
{{ end }}

</div>

0 comments on commit 2074dd5

Please sign in to comment.