Add categories to articles again

This commit is contained in:
Matthew Grove
2019-02-05 08:14:34 +00:00
parent e98316f947
commit 9fb6ea5d41
2 changed files with 3 additions and 2 deletions

View File

@@ -12,10 +12,10 @@
<i class="material-icons mdc-list-item__graphic" aria-hidden="true">home</i> <i class="material-icons mdc-list-item__graphic" aria-hidden="true">home</i>
<span class="mdc-list-item__text">Home Page</span> <span class="mdc-list-item__text">Home Page</span>
</a> </a>
{% if site.posts %} {% if site.categories.articles %}
<div class="mdc-list-group"> <div class="mdc-list-group">
<h3 class="mdc-list-group__subheader">Articles</h3> <h3 class="mdc-list-group__subheader">Articles</h3>
{% for article in site.posts %} {% for article in site.categories.articles %}
{% assign currentdate = article.date | date: "%Y" %} {% assign currentdate = article.date | date: "%Y" %}
{% if currentdate != date %} {% if currentdate != date %}
<h3 class="mdc-list-group__subheader">{{ currentdate }}</h3> <h3 class="mdc-list-group__subheader">{{ currentdate }}</h3>

View File

@@ -4,6 +4,7 @@ date: 2019-01-01 7:01
authors: Name authors: Name
image-caption: A caption for the cover image image-caption: A caption for the cover image
layout: article layout: article
categories: articles
--- ---
Content Content