all repos — aaoth.xyz @ da0f09076ee4a3a9c0598f1f58982a1993f5eab8

aaoth.xyz website

add post count indicator to a tag page
la-ninpre leobrekalini@gmail.com
Thu, 22 Jul 2021 23:50:50 +0300
commit

da0f09076ee4a3a9c0598f1f58982a1993f5eab8

parent

443d8ec97b8b3e478cd7f3bb5c722eaedca83c5c

1 files changed, 12 insertions(+), 0 deletions(-)

jump to
M _layouts/tagsort.html_layouts/tagsort.html

@@ -4,6 +4,18 @@ ---

<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 %}