diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-26 19:15:58 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-26 19:15:58 +0530 |
| commit | ea129c608d33ddaf8451304ad7376caf11ee03f8 (patch) | |
| tree | cc7a004d8aaa5736a1131167af8c3e79c0097cf7 | |
| parent | 880ce9bf689eaf01f8d876fade93c34036d5a107 (diff) | |
list, index : show reading time
if Params.ShowReadingTime = true
| -rw-r--r-- | layouts/_default/index.html | 2 | ||||
| -rw-r--r-- | layouts/_default/list.html | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/layouts/_default/index.html b/layouts/_default/index.html index da9bb2c..94ab8ff 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -32,6 +32,8 @@ </section> <footer class="entry-footer"> <time>{{ .Date.Format "January 2, 2006" }}</time> + {{ if $.Site.Params.ShowReadingTime }} . + {{ .ReadingTime }}{{ $.Site.Params.MinuteReadingTime | default "min read" }}{{ end }} </footer> <a class="entry-link" href="{{ .Permalink }}"></a> </article> diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 7aa6bd8..bf67f37 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -27,6 +27,8 @@ </section> <footer class="entry-footer"> <time>{{ .Date.Format "January 2, 2006" }}</time> + {{ if $.Site.Params.ShowReadingTime }} . + {{ .ReadingTime }}{{ $.Site.Params.MinuteReadingTime | default "min read" }}{{ end }} </footer> <a class="entry-link" href="{{ .Permalink }}"></a> </article> |
