blog/_includes/views/segments.html

22 lines
544 B
HTML
Raw Normal View History

2019-09-11 06:19:34 +02:00
{%- if include.keys -%}
{%- assign keys = include.keys -%}
{%- endif -%}
{%- if include.field -%}
{%- assign field = include.field -%}
{%- endif -%}
<div class="page-segments">
<ul class="page-segments-list">
{% for key in keys %}
<h2 id="{{ key }}" class="segment-name">{{ key }}</h2>
{% assign items = site.posts | where: field, key %}
{% for item in items %}
{% if item != nil %}
<li> {% include views/post-item.html %} </li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
</div>