Fixed redirect post access from blog archive (#1994)

Fixes #1831

Signed-off-by: George Araújo <george.gcac@gmail.com>
This commit is contained in:
George 2023-12-14 15:47:28 -03:00 committed by GitHub
parent 199718610e
commit f9b8d45081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View File

@ -16,7 +16,13 @@ layout: default
<tr>
<th scope="row">{{ post.date | date: "%b %-d, %Y" }}</th>
<td>
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% if post.redirect == blank %}
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% elsif post.redirect contains '://' %}
<a class="post-link" href="{{ post.redirect }}" target="_blank">{{ post.title }}</a>
{% else %}
<a class="post-link" href="{{ post.redirect | relative_url }}">{{ post.title }}</a>
{% endif %}
</td>
</tr>
{% endfor %}

View File

@ -16,7 +16,13 @@ layout: default
<tr>
<th scope="row">{{ post.date | date: "%b %-d, %Y" }}</th>
<td>
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% if post.redirect == blank %}
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% elsif post.redirect contains '://' %}
<a class="post-link" href="{{ post.redirect }}" target="_blank">{{ post.title }}</a>
{% else %}
<a class="post-link" href="{{ post.redirect | relative_url }}">{{ post.title }}</a>
{% endif %}
</td>
</tr>
{% endfor %}

View File

@ -16,7 +16,13 @@ layout: default
<tr>
<th scope="row">{{ post.date | date: "%b %-d, %Y" }}</th>
<td>
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% if post.redirect == blank %}
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% elsif post.redirect contains '://' %}
<a class="post-link" href="{{ post.redirect }}" target="_blank">{{ post.title }}</a>
{% else %}
<a class="post-link" href="{{ post.redirect | relative_url }}">{{ post.title }}</a>
{% endif %}
</td>
</tr>
{% endfor %}