From af9abf236870c77dc799298d192dbdb161bdbff3 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Sun, 8 Mar 2026 07:56:52 +0100 Subject: [PATCH] Skip empty titles in homepage Recent Posts cards --- _includes/components/sections/recent-posts.njk | 8 ++++---- theme/_includes/components/sections/recent-posts.njk | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_includes/components/sections/recent-posts.njk b/_includes/components/sections/recent-posts.njk index 5e9f2ed..9f33f1d 100644 --- a/_includes/components/sections/recent-posts.njk +++ b/_includes/components/sections/recent-posts.njk @@ -84,9 +84,9 @@ {{ post.date | dateDisplay }} - {% if post.data.title %} + {% if post.data.title and (post.data.title | trim) %}

- {{ post.data.title }} + {{ post.data.title | trim }}

{% endif %} {{ bookmarkedUrl | unfurlCard | safe }} @@ -194,11 +194,11 @@ - {% elif post.data.title %} + {% elif post.data.title and (post.data.title | trim) %} {# ── Article card ── #}

- {{ post.data.title }} + {{ post.data.title | trim }}

{% if showSummary and post.templateContent %} diff --git a/theme/_includes/components/sections/recent-posts.njk b/theme/_includes/components/sections/recent-posts.njk index 6c89b14..e7b459b 100644 --- a/theme/_includes/components/sections/recent-posts.njk +++ b/theme/_includes/components/sections/recent-posts.njk @@ -84,9 +84,9 @@ {{ post.date | dateDisplay }} - {% if post.data.title %} + {% if post.data.title and (post.data.title | trim) %}

- {{ post.data.title }} + {{ post.data.title | trim }}

{% endif %} {{ bookmarkedUrl | unfurlCard | safe }} @@ -194,11 +194,11 @@ - {% elif post.data.title %} + {% elif post.data.title and (post.data.title | trim) %} {# ── Article card ── #}

- {{ post.data.title }} + {{ post.data.title | trim }}

{% if showSummary and post.templateContent %}