diff options
Diffstat (limited to '_includes/sidebar/common-list.html')
-rw-r--r-- | _includes/sidebar/common-list.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/_includes/sidebar/common-list.html b/_includes/sidebar/common-list.html new file mode 100644 index 0000000..7e7bf96 --- /dev/null +++ b/_includes/sidebar/common-list.html @@ -0,0 +1,25 @@ +{%- if include.keys -%} + {%- assign keys = include.keys -%} +{%- endif -%} + +{%- if include.field -%} + {%- assign field = include.field -%} +{%- endif -%} + +<div class="common-list"> + <ul> + <li> + <a href="/index.html"> + All<span>{{ site.posts.size }}</span> + </a> + </li> + + {% for key in keys %} + <li> + <a href="{{ url }}#h-{{ key }}"> + {{ key }} <span>{{ site.posts | where: field, key | size }}</span> + </a> + </li> + {% endfor %} + </ul> +</div> |