Really, the theme itself should use PAGINATION_PATTERNS rather than
making me hack the template. (All in all, pelican-simplegrey does not
seem technically polished to me.) But we make do with the blog engine we
have, and take pride in it not being boring, mainstream WordPress.
AUTHOR_URL = 'author/{slug}/'
AUTHOR_SAVE_AS = 'author/{slug}/index.html'
+PAGINATION_PATTERNS = (
+ (1, '{base_name}/', '{base_name}/index.html'),
+ (2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),
+)
+
THEME = 'theme'
# Uncomment following line if you want document-relative URLs when developing
<div class="pagination">
{% if articles_page.has_previous() %}
{% if articles_page.previous_page_number() == 1 %}
- <a href="{{ SITEURL }}/{{ page_name }}.html">«</a>
+ <a href="{{ SITEURL }}/{{ page_name }}">«</a>
{% else %}
- <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">«</a>
+ <a href="{{ SITEURL }}/{{ page_name }}page/{{ articles_page.previous_page_number() }}/">«</a>
{% endif %}
{% endif %}
Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
{% if articles_page.has_next() %}
- <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">»</a>
+ <a href="{{ SITEURL }}/{{ page_name }}page/{{ articles_page.next_page_number() }}/">»</a>
{% endif %}
</div>
{% endif %}