* Make {section, page}.path always start with a slash Change tests accordingly * Fix missing leading/trailing slash in current_path of Taxonomy ("tags") and TaxonomyItem ("some-tag") * Make {Paginator, Pager}.path always start with a slash Fix Paginator.path missing trailing slash in from_taxonomy() Change tests accordingly * Update documentation regarding current_path now always starting with a slash * Fix asymptomatic inverted logic in filter() for {section, page}.assets * Add to 3 integration tests several checks for current_path in different templates * Add a check for current_path in a paginated index section, "/page/2/" This requires adding two dummy pages in the content root. * Fix false passing of test on paginator.last due to URL prefix matching A string formatting such as {name: value} can help prevent this.
23 lines
720 B
HTML
23 lines
720 B
HTML
{% if not paginator %}
|
|
Tag: {{ term.name }}
|
|
|
|
{% for page in term.pages %}
|
|
<article>
|
|
<h3 class="post__title"><a href="{{ page.permalink | safe }}">{{ page.title | safe }}</a></h3>
|
|
</article>
|
|
{% endfor %}
|
|
{% else %}
|
|
Tag: {{ term.name }}
|
|
{% for page in paginator.pages %}
|
|
{{page.title|safe}}
|
|
{% endfor %}
|
|
Num pagers: {{ paginator.number_pagers }}
|
|
Page size: {{ paginator.paginate_by }}
|
|
Current index: {{ paginator.current_index }}
|
|
First: {{ paginator.first | safe }}
|
|
Last: {{ paginator.last | safe }}
|
|
{% if paginator.previous %}has_prev{% endif%}
|
|
{% if paginator.next %}has_next{% endif%}
|
|
{% endif %}
|
|
|
|
{% include "current_path.html" %} |