forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 23
/
related_posts.liquid
22 lines (20 loc) · 977 Bytes
/
related_posts.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% assign have_related_posts = false %}
{% for post in site.related_posts | limit: site.related_blog_posts.max_related %}
{% unless have_related_posts %}
{% assign have_related_posts = true %}
<br>
<hr>
<br>
<ul class="list-disc pl-8"></ul>
<!-- Adds related posts to the end of an article -->
<h2 class="text-3xl font-semibold mb-4 mt-12">{{ site.data[site.active_lang].strings.related_posts.title }}</h2>
<p class="mb-2">{{ site.data[site.active_lang].strings.related_posts.description }}</p>
{% 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>
</li>
{% endfor %}
{% if site.newsletter.enabled and site.footer_fixed %}
<p class="mb-2" style="margin-top: 1.5rem !important">{{ site.data[site.active_lang].strings.newsletter.subscribe_to_receive }}</p>
{% include scripts/newsletter.liquid left=true %}
{% endif %}