From 3a9d7d9652bc54ad4b9af8dbdc8f40b15c320a22 Mon Sep 17 00:00:00 2001 From: rzen Date: Tue, 2 Jun 2020 21:04:53 -0400 Subject: [PATCH] add optional intro, outro, title and subtitle for the index page --- _includes/post_index.html | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/_includes/post_index.html b/_includes/post_index.html index d67bef8..974a73c 100644 --- a/_includes/post_index.html +++ b/_includes/post_index.html @@ -1,7 +1,18 @@ -{% if include.title == blank %} + +{% assign title=(include.title | default: site.index.title)%} + +{% if title == blank %}

{{ include.posts | size }} blogs since {{ include.posts | sort: 'date' | map: 'date' | compact | first | date: '%Y' }}

{% else if %} -

{{ include.title }}

+

{{ title }}

+{% endif %} + +{% if site.index.intro != blank %} + {{ site.index.intro }} +{% endif %} + +{% if site.index.subtitle != blank %} +

{{ site.index.subtitle }}

{% endif %} {% assign prev_year = 'first run' %} @@ -35,3 +46,7 @@ {% if current_year != date %} {% endif %} {% endfor %} + +{% if site.index.outro != blank %} + {{ site.index.outro }} +{% endif %}