From 50ce2b5fda2ec892131f5fb5bda37a93e7846dd7 Mon Sep 17 00:00:00 2001 From: Alexandre Vicenzi Date: Wed, 31 Aug 2022 19:46:10 +0200 Subject: [PATCH] Move series and related_posts plugins to a partial --- templates/article.html | 39 +++++----------------------- templates/partial/related_posts.html | 14 ++++++++++ templates/partial/series.html | 37 ++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 33 deletions(-) create mode 100644 templates/partial/related_posts.html create mode 100644 templates/partial/series.html diff --git a/templates/article.html b/templates/article.html index 22ba69e..946bdd1 100644 --- a/templates/article.html +++ b/templates/article.html @@ -68,42 +68,14 @@ {% endif %} + {% include "partial/series.html" %} + {% include "partial/neighbors.html" %} - {% if article.related_posts %} - - {% elif ADD_THIS_ID %} - - {% endif %} + {% include "partial/related_posts.html" %} - {% if article.series %} - + {% if ADD_THIS_ID %} + {% endif %} {% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.article_bottom %} @@ -117,6 +89,7 @@ {% endif %} {% include "partial/disqus.html" %} + {% include "partial/isso.html" %} {% endblock %} diff --git a/templates/partial/related_posts.html b/templates/partial/related_posts.html new file mode 100644 index 0000000..9df4091 --- /dev/null +++ b/templates/partial/related_posts.html @@ -0,0 +1,14 @@ +{% if 'pelican.plugins.related_posts' in PLUGINS %} + {% if article.related_posts %} + + {% endif %} +{% endif %} diff --git a/templates/partial/series.html b/templates/partial/series.html new file mode 100644 index 0000000..2b74d7b --- /dev/null +++ b/templates/partial/series.html @@ -0,0 +1,37 @@ +{% if 'pelican.plugins.series' in PLUGINS %} + {% if article.series %} + + {% endif %} +{% endif %}