mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 10:15:22 +00:00
Add estimated reading time to post metadata
- Set `reading_time = false` under `[params]` config to disable
This commit is contained in:
1 parent
34b9cf573c
commit
6270d6e4a0
4 files changed
+13
No files matched your search
@@ -53,6 +53,9 @@ defaultContentLanguageInSubdir = false
|
||||
# Examples: "Mon, Jan 2, 2006" or "2006-01-02"
|
||||
date_format = "Jan 2, 2006"
|
||||
|
||||
# Show estimated reading time for posts?
|
||||
reading_time = true
|
||||
|
||||
# Enable global LaTeX math rendering?
|
||||
# If false, you can enable it locally on a per page basis.
|
||||
math = false
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
- id: related
|
||||
translation: Related
|
||||
|
||||
- id: minute_read
|
||||
translation: min read
|
||||
|
||||
# Buttons
|
||||
|
||||
- id: btn_details
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
</time>
|
||||
</span>
|
||||
|
||||
{{ if ne $.Site.Params.reading_time false }}
|
||||
<span class="article-reading-time">
|
||||
{{ $.ReadingTime }} {{ i18n "minute_read" }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ if isset $.Params "categories" }}
|
||||
{{ $categoriesLen := len $.Params.categories }}
|
||||
{{ if gt $categoriesLen 0 }}
|
||||
|
||||
@@ -465,6 +465,7 @@ article {
|
||||
}
|
||||
|
||||
.article-metadata .article-date,
|
||||
.article-metadata .article-reading-time,
|
||||
.article-metadata .article-categories,
|
||||
.article-metadata .article-tags {
|
||||
margin-right: 10px;
|
||||
|
||||
Reference in new issue
Block a user