summaryrefslogtreecommitdiff
path: root/_includes/sidebar/common-list.html
blob: 7e7bf96355de312b4fd749d4af63294869d1c4aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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>