Move series and related_posts plugins to a partial

This commit is contained in:
Alexandre Vicenzi 2022-08-31 19:46:10 +02:00
parent 513ceccdf2
commit 50ce2b5fda
3 changed files with 57 additions and 33 deletions

View file

@ -0,0 +1,14 @@
{% if 'pelican.plugins.related_posts' in PLUGINS %}
{% if article.related_posts %}
<div class="related-posts">
<h5>{{ _('You might enjoy') }}</h5>
<ul>
{% for related_post in article.related_posts %}
<li>
<a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}