mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 01:47:28 -05:00
Show post count in series metadata
This commit is contained in:
20
layouts/partials/post-metadata/series.html
Normal file
20
layouts/partials/post-metadata/series.html
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="post-metadata">
|
||||
<span class="post-meta-item">
|
||||
{{ partial "icon.html" "newspaper" }}
|
||||
{{ i18n "post_count" (len .Data.Pages) }}
|
||||
</span>
|
||||
|
||||
{{ if ne .Site.Params.readingtime false }}
|
||||
<span class="post-meta-item">
|
||||
{{ partial "icon.html" "clock" }}
|
||||
{{ $readingtime := 0 }}
|
||||
{{ range .Data.Pages }}
|
||||
{{ $readingtime = (add $readingtime .ReadingTime) }}
|
||||
{{ end }}
|
||||
{{ i18n "readingtime" $readingtime }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "post-meta-item/translations.html" . }}
|
||||
{{ partial "post-meta-item/viewsource.html" . }}
|
||||
</div>
|
Reference in New Issue
Block a user