From 164c2224a0399cf054de28972b9d97404a01e204 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 5 Jun 2023 16:27:32 +0200 Subject: [PATCH] auto-generate descriptions from blog excerpts --- web/_layouts/default.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/web/_layouts/default.html b/web/_layouts/default.html index d62fb3e..5e8c84e 100644 --- a/web/_layouts/default.html +++ b/web/_layouts/default.html @@ -2,13 +2,19 @@ + {% if page.summary %} + {% assign description = page.summary %} + {% elsif page.excerpt %} + {% assign description = page.excerpt | strip_html | strip_newlines %} + {% endif %} + {{ page.title }} - {% if page.summary %} - + {% if description %} + {% endif %} @@ -18,8 +24,8 @@ - {% if page.summary %} - + {% if description %} + {% endif %}