Fix related external posts (#2980)

Fixes #2977

Signed-off-by: George Araújo <george.gcac@gmail.com>
This commit is contained in:
George 2025-01-23 14:05:32 -03:00 committed by GitHub
parent d3402d0379
commit 8266accd93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,16 @@
{% endunless %}
<li class="my-2">
<a class="text-pink-700 underline font-semibold hover:text-pink-800" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
{% if post.redirect == blank %}
<a class="text-pink-700 underline font-semibold hover:text-pink-800" href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% elsif post.redirect contains '://' %}
<a class="text-pink-700 underline font-semibold hover:text-pink-800" href="{{ post.redirect }}" target="_blank">{{ post.title }}</a>
<svg width="1rem" height="1rem" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9" class="icon_svg-stroke" stroke="#999" stroke-width="1.5" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
{% else %}
<a class="text-pink-700 underline font-semibold hover:text-pink-800" href="{{ post.redirect | relative_url }}">{{ post.title }}</a>
{% endif %}
</li>
{% endfor %}
{% if site.newsletter.enabled and site.footer_fixed %}