diff --git a/pelican/themes/notmyidea/templates/index.html b/pelican/themes/notmyidea/templates/index.html
index f81275ae..69dc4622 100644
--- a/pelican/themes/notmyidea/templates/index.html
+++ b/pelican/themes/notmyidea/templates/index.html
@@ -19,7 +19,7 @@
Other articles
-
+
{% endif %}
{# other items #}
{% else %}
@@ -44,17 +44,17 @@
or not articles_page.has_previous() and loop.length > 1) %}
{% include 'pagination.html' %}
{% endif %}
-{% endfor %}
- {% if loop.length > 1 or articles_page.has_previous() %}
-
-
-{% endif %}
+ {% if loop.last %}
+
+
+ {% endif %}
+ {% endfor %}
{% else %}
Pages
-{% for page in PAGES %}
- {{ page.title }}
-{% endfor %}
+ {% for page in PAGES %}
+ {{ page.title }}
+ {% endfor %}
{% endif %}
{% endblock content %}
diff --git a/tests/output/basic/author/alexis-metaireau.html b/tests/output/basic/author/alexis-metaireau.html
index eda5498d..ab68482d 100644
--- a/tests/output/basic/author/alexis-metaireau.html
+++ b/tests/output/basic/author/alexis-metaireau.html
@@ -83,12 +83,13 @@ YEAH !
Other articles
-
+
+
@@ -124,11 +125,11 @@ as well as inline markup.
-
+
+
+
+
-
-
-
diff --git a/tests/output/basic/author/bruno.html b/tests/output/basic/author/bruno.html
index fdc1da37..1e2dc655 100644
--- a/tests/output/basic/author/bruno.html
+++ b/tests/output/basic/author/bruno.html
@@ -72,12 +72,13 @@
Other articles
-
+
+
@@ -112,6 +113,7 @@
+
@@ -146,6 +148,7 @@
+
@@ -180,6 +183,7 @@
+
@@ -219,6 +223,7 @@ Translations:
+
@@ -254,11 +259,11 @@ Translations:
-
+
+
+
+
-
-
-
diff --git a/tests/output/basic/category/bar.html b/tests/output/basic/category/bar.html
index 07dcae9e..b268dd53 100644
--- a/tests/output/basic/category/bar.html
+++ b/tests/output/basic/category/bar.html
@@ -85,7 +85,10 @@ YEAH !
-
+
+
+
+
diff --git a/tests/output/basic/category/cat1.html b/tests/output/basic/category/cat1.html
index bee9d918..e92fd0df 100644
--- a/tests/output/basic/category/cat1.html
+++ b/tests/output/basic/category/cat1.html
@@ -72,12 +72,13 @@
Other articles
-
+
+
@@ -112,6 +113,7 @@
+
@@ -146,6 +148,7 @@
+
@@ -181,11 +184,11 @@
-
+
+
+
+
-
-
-
diff --git a/tests/output/basic/category/content.html b/tests/output/basic/category/content.html
index 1c09459d..0eec912c 100644
--- a/tests/output/basic/category/content.html
+++ b/tests/output/basic/category/content.html
@@ -78,12 +78,13 @@ Translations:
Other articles
-
+
+
@@ -119,11 +120,11 @@ Translations:
-
+
+
+
+
-
-
-
diff --git a/tests/output/basic/category/yeah.html b/tests/output/basic/category/yeah.html
index cc146893..ccb531f1 100644
--- a/tests/output/basic/category/yeah.html
+++ b/tests/output/basic/category/yeah.html
@@ -86,7 +86,10 @@
-
+
+
+
+
diff --git a/tests/output/basic/index.html b/tests/output/basic/index.html
index be97e8c8..8a2091b9 100644
--- a/tests/output/basic/index.html
+++ b/tests/output/basic/index.html
@@ -78,12 +78,13 @@ Translations:
Other articles
-
+
+
@@ -117,6 +118,7 @@ Translations:
+
@@ -151,6 +153,7 @@ Translations:
+
@@ -185,6 +188,7 @@ Translations:
+
@@ -219,6 +223,7 @@ Translations:
+
@@ -253,6 +258,7 @@ as well as inline markup.
+
@@ -297,6 +303,7 @@ YEAH !
+
@@ -332,11 +339,11 @@ YEAH !
-
+
+
+
+
-
-
-
diff --git a/tests/output/basic/tag/bar.html b/tests/output/basic/tag/bar.html
index 8fc4e143..4afb4bfd 100644
--- a/tests/output/basic/tag/bar.html
+++ b/tests/output/basic/tag/bar.html
@@ -78,12 +78,13 @@ Translations:
Other articles
-
+
+
@@ -123,6 +124,7 @@ Translations:
+
@@ -157,6 +159,7 @@ as well as inline markup.
+
@@ -202,11 +205,11 @@ YEAH !
-
+
+
+
+
-
-
-
diff --git a/tests/output/basic/tag/baz.html b/tests/output/basic/tag/baz.html
index 9f773873..b8df58e3 100644
--- a/tests/output/basic/tag/baz.html
+++ b/tests/output/basic/tag/baz.html
@@ -78,12 +78,13 @@ Translations:
Other articles
-
+
+
@@ -124,11 +125,11 @@ Translations:
-
+
+
+
+
-
-
-
diff --git a/tests/output/basic/tag/foo.html b/tests/output/basic/tag/foo.html
index 73de8459..20cf293a 100644
--- a/tests/output/basic/tag/foo.html
+++ b/tests/output/basic/tag/foo.html
@@ -78,12 +78,13 @@ Translations:
Other articles
-
+
+
@@ -123,6 +124,7 @@ Translations:
+
@@ -158,11 +160,11 @@ as well as inline markup.
-
+
+
+
+
-
-
-
diff --git a/tests/output/basic/tag/foobar.html b/tests/output/basic/tag/foobar.html
index 55ddfe78..0a5eeb3b 100644
--- a/tests/output/basic/tag/foobar.html
+++ b/tests/output/basic/tag/foobar.html
@@ -86,7 +86,10 @@
-
+
+
+
+
diff --git a/tests/output/basic/tag/oh.html b/tests/output/basic/tag/oh.html
index a8839f52..563c0f2e 100644
--- a/tests/output/basic/tag/oh.html
+++ b/tests/output/basic/tag/oh.html
@@ -85,7 +85,10 @@ YEAH !
-
+
+
+
+
diff --git a/tests/output/basic/tag/yeah.html b/tests/output/basic/tag/yeah.html
index 5ff2b2e0..4b18b7e3 100644
--- a/tests/output/basic/tag/yeah.html
+++ b/tests/output/basic/tag/yeah.html
@@ -85,7 +85,10 @@ YEAH !
-
+
+
+
+
diff --git a/tests/output/custom/author/alexis-metaireau.html b/tests/output/custom/author/alexis-metaireau.html
index 89893dd9..1a373e5d 100644
--- a/tests/output/custom/author/alexis-metaireau.html
+++ b/tests/output/custom/author/alexis-metaireau.html
@@ -80,12 +80,13 @@
Other articles
-
+
+
@@ -120,6 +121,7 @@
+
@@ -154,6 +156,7 @@
+
@@ -197,11 +200,11 @@
-
+
+
+
+
-
-
-
diff --git a/tests/output/custom/author/alexis-metaireau2.html b/tests/output/custom/author/alexis-metaireau2.html
index be2c0db2..43ded360 100644
--- a/tests/output/custom/author/alexis-metaireau2.html
+++ b/tests/output/custom/author/alexis-metaireau2.html
@@ -99,6 +99,7 @@ YEAH !
+
@@ -138,6 +139,7 @@ Translations:
+
@@ -172,6 +174,7 @@ as well as inline markup.
+
@@ -217,11 +220,11 @@ as well as inline markup.
-
+
+
+
+
-
-
-
diff --git a/tests/output/custom/category/bar.html b/tests/output/custom/category/bar.html
index d2088eae..809a2bdf 100644
--- a/tests/output/custom/category/bar.html
+++ b/tests/output/custom/category/bar.html
@@ -99,7 +99,10 @@ YEAH !
-
+
+
+
+
diff --git a/tests/output/custom/category/cat1.html b/tests/output/custom/category/cat1.html
index d0ac8972..fa6c6556 100644
--- a/tests/output/custom/category/cat1.html
+++ b/tests/output/custom/category/cat1.html
@@ -80,12 +80,13 @@
Other articles
-
+
+
@@ -120,6 +121,7 @@
+
@@ -154,6 +156,7 @@
+
@@ -195,11 +198,11 @@
-
+
+
+
+
-
-
-
diff --git a/tests/output/custom/category/content.html b/tests/output/custom/category/content.html
index 389d7707..16651436 100644
--- a/tests/output/custom/category/content.html
+++ b/tests/output/custom/category/content.html
@@ -86,12 +86,13 @@ Translations:
Other articles
-
+
+
@@ -133,11 +134,11 @@ Translations:
-
+
+
+
+
-
-
-
diff --git a/tests/output/custom/category/yeah.html b/tests/output/custom/category/yeah.html
index b70b36e7..3c9af4e2 100644
--- a/tests/output/custom/category/yeah.html
+++ b/tests/output/custom/category/yeah.html
@@ -100,7 +100,10 @@
-
+
+
+
+
diff --git a/tests/output/custom/index.html b/tests/output/custom/index.html
index 2154ea99..466a4db4 100644
--- a/tests/output/custom/index.html
+++ b/tests/output/custom/index.html
@@ -86,12 +86,13 @@ Translations:
Other articles
-
+
+
@@ -125,6 +126,7 @@ Translations:
+
@@ -159,6 +161,7 @@ Translations:
+
@@ -202,11 +205,11 @@ Translations:
-
+
+
+
+
-
-
-
diff --git a/tests/output/custom/index2.html b/tests/output/custom/index2.html
index 9604afd7..9262d717 100644
--- a/tests/output/custom/index2.html
+++ b/tests/output/custom/index2.html
@@ -89,6 +89,7 @@
+
@@ -123,6 +124,7 @@ as well as inline markup.
+
@@ -167,6 +169,7 @@ YEAH !
+
@@ -212,11 +215,11 @@ YEAH !
-
+
+
+
+
-
-
-
diff --git a/tests/output/custom/tag/bar.html b/tests/output/custom/tag/bar.html
index 069276ad..bf468bf2 100644
--- a/tests/output/custom/tag/bar.html
+++ b/tests/output/custom/tag/bar.html
@@ -86,12 +86,13 @@ Translations:
Other articles
-
+
+
@@ -131,6 +132,7 @@ Translations:
+
@@ -165,6 +167,7 @@ as well as inline markup.
+
@@ -216,11 +219,11 @@ YEAH !
-
+
+
+
+
-
-
-
diff --git a/tests/output/custom/tag/baz.html b/tests/output/custom/tag/baz.html
index 02d87aa1..34bcdbc3 100644
--- a/tests/output/custom/tag/baz.html
+++ b/tests/output/custom/tag/baz.html
@@ -86,12 +86,13 @@ Translations:
Other articles
-
+
+
@@ -138,11 +139,11 @@ Translations:
-
+
+
+
+
-
-
-
diff --git a/tests/output/custom/tag/foo.html b/tests/output/custom/tag/foo.html
index 2089003d..c8f088f1 100644
--- a/tests/output/custom/tag/foo.html
+++ b/tests/output/custom/tag/foo.html
@@ -86,12 +86,13 @@ Translations:
Other articles
-
+
+
@@ -131,6 +132,7 @@ Translations:
+
@@ -172,11 +174,11 @@ as well as inline markup.
-
+
+
+
+
-
-
-
diff --git a/tests/output/custom/tag/foobar.html b/tests/output/custom/tag/foobar.html
index 8187acd5..682a9b7d 100644
--- a/tests/output/custom/tag/foobar.html
+++ b/tests/output/custom/tag/foobar.html
@@ -100,7 +100,10 @@
-
+
+
+
+
diff --git a/tests/output/custom/tag/oh.html b/tests/output/custom/tag/oh.html
index a27bb302..9e8239a4 100644
--- a/tests/output/custom/tag/oh.html
+++ b/tests/output/custom/tag/oh.html
@@ -99,7 +99,10 @@ YEAH !
-
+
+
+
+
diff --git a/tests/output/custom/tag/yeah.html b/tests/output/custom/tag/yeah.html
index ac1ef4fa..675a53cb 100644
--- a/tests/output/custom/tag/yeah.html
+++ b/tests/output/custom/tag/yeah.html
@@ -99,7 +99,10 @@ YEAH !
-
+
+
+
+