Files
PAT/_layouts/category.html
2019-02-03 14:34:49 +08:00

37 lines
1.1 KiB
HTML

---
layout: default
---
<div class="home">
{{ content }}
{% assign Articles = site.articles | sort: "title" %}
{%- if Articles.size -%}
<h2 class="post-list-heading">{{ page.title | default: "Articles" }}</h2>
<ul class="post-list">
{%- for item in Articles -%}
{% assign ic = item.categories | first %}
{% assign pc = page.category %}
{% if ic == pc %}
<li>
<h3 class="post-list-title">
<a class="post-link" href="{{ item.url | relative_url }}">
{{ item.title | escape }}
</a>
</h3>
{%- include post-meta.html page=item -%}
{%- if site.show_excerpts -%}
{{ item.excerpt }}
{%- endif -%}
</li>
{% endif %}
{%- endfor -%}
</ul>
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
{%- endif -%}
</div>