From f9b8d450813cc36bf783860b806e3edcb27a4418 Mon Sep 17 00:00:00 2001 From: George <31376482+george-gca@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:47:28 -0300 Subject: [PATCH] Fixed redirect post access from blog archive (#1994) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1831 Signed-off-by: George Araújo --- _layouts/archive-category.html | 8 +++++++- _layouts/archive-tag.html | 8 +++++++- _layouts/archive-year.html | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/_layouts/archive-category.html b/_layouts/archive-category.html index 1a477a6..68ab211 100644 --- a/_layouts/archive-category.html +++ b/_layouts/archive-category.html @@ -16,7 +16,13 @@ layout: default {{ post.date | date: "%b %-d, %Y" }} - {{ post.title }} + {% if post.redirect == blank %} + {{ post.title }} + {% elsif post.redirect contains '://' %} + {{ post.title }} + {% else %} + {{ post.title }} + {% endif %} {% endfor %} diff --git a/_layouts/archive-tag.html b/_layouts/archive-tag.html index 7d1caf7..acef07f 100644 --- a/_layouts/archive-tag.html +++ b/_layouts/archive-tag.html @@ -16,7 +16,13 @@ layout: default {{ post.date | date: "%b %-d, %Y" }} - {{ post.title }} + {% if post.redirect == blank %} + {{ post.title }} + {% elsif post.redirect contains '://' %} + {{ post.title }} + {% else %} + {{ post.title }} + {% endif %} {% endfor %} diff --git a/_layouts/archive-year.html b/_layouts/archive-year.html index 125e9b0..55154bc 100644 --- a/_layouts/archive-year.html +++ b/_layouts/archive-year.html @@ -16,7 +16,13 @@ layout: default {{ post.date | date: "%b %-d, %Y" }} - {{ post.title }} + {% if post.redirect == blank %} + {{ post.title }} + {% elsif post.redirect contains '://' %} + {{ post.title }} + {% else %} + {{ post.title }} + {% endif %} {% endfor %}