From e98316f9473ae1afd3649a1579183d9612fd30f0 Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Tue, 5 Feb 2019 08:11:59 +0000 Subject: [PATCH] Refine navbar Add year subtitles automatically and remove need for categories on posts --- _includes/navbar.html | 11 ++++++++--- _posts/_template/2019-01-01-article-name.md | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/_includes/navbar.html b/_includes/navbar.html index 8ae98c5..56d8707 100644 --- a/_includes/navbar.html +++ b/_includes/navbar.html @@ -12,13 +12,18 @@ Home Page - {% if site.categories.articles %} + {% if site.posts %}

Articles

- {% for page in site.categories.articles %} + {% for article in site.posts %} + {% assign currentdate = article.date | date: "%Y" %} + {% if currentdate != date %} +

{{ currentdate }}

+ {% assign date = currentdate %} + {% endif %} - {{ page.title }} + {{ article.title }} {% endfor %}
diff --git a/_posts/_template/2019-01-01-article-name.md b/_posts/_template/2019-01-01-article-name.md index 7d44221..c1139e0 100644 --- a/_posts/_template/2019-01-01-article-name.md +++ b/_posts/_template/2019-01-01-article-name.md @@ -4,7 +4,6 @@ date: 2019-01-01 7:01 authors: Name image-caption: A caption for the cover image layout: article -categories: articles --- Content