diff options
| author | la-ninpre <leobrekalini@gmail.com> | 2021-07-22 23:50:50 +0300 |
|---|---|---|
| committer | la-ninpre <leobrekalini@gmail.com> | 2021-07-22 23:50:50 +0300 |
| commit | da0f09076ee4a3a9c0598f1f58982a1993f5eab8 (patch) | |
| tree | bdb65c70ac3509382e5fdb5af6d5285bdb8afc99 /_layouts | |
| parent | 443d8ec97b8b3e478cd7f3bb5c722eaedca83c5c (diff) | |
| download | aaoth.xyz-da0f09076ee4a3a9c0598f1f58982a1993f5eab8.tar.gz aaoth.xyz-da0f09076ee4a3a9c0598f1f58982a1993f5eab8.zip | |
add post count indicator to a tag page
Diffstat (limited to '_layouts')
| -rw-r--r-- | _layouts/tagsort.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/_layouts/tagsort.html b/_layouts/tagsort.html index 359484a..5dd20ec 100644 --- a/_layouts/tagsort.html +++ b/_layouts/tagsort.html @@ -4,6 +4,18 @@ layout: default <h1>{{ page.tag }}</h1> +{% capture nposts %} +{{ site.tags[page.tag] | size }} +{%- endcapture -%} +{%- capture nposts_mod10 -%} +{{ nposts | modulo: 10 }} +{%- endcapture -%} +<small> + {{ nposts }} {% if nposts_mod10 == "1" %} post + {%- else -%} posts + {% endif %} +</small> + <div class="posts"> {% for post in site.tags[page.tag] %} {% include post-preview.html %} |
