Skip to content

Commit be52a96

Browse files
authored
fix: remove 'index.html' in pagination (alshedivat#2509)
Currently, on the [blog](https://alshedivat.github.io/al-folio/blog/) page, clicking "older" and "newer" on the pagination at the bottom direct you forward to links like `/al-folio/blog/page/2/` and backward to `/al-folio/blog/`. However, if you click on the `1`, `2`.. etc buttons, there is a different behavior. The links now contain an `index.html`. For example, clicking `2` leads you to `/al-folio/blog/page/2/index.html`. It is the same content, just with a messier hyper link. Same with clicking `1`, you are brought to `/al-folio/blog/`. This fix creates a consistency among the hyper links in pagination.
1 parent 1a7fdde commit be52a96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_includes/pagination.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{% if paginator.page_trail %}
1010
{% for trail in paginator.page_trail %}
1111
<li class="page-item {% if page.url == trail.path %}active{% endif %}">
12-
<a class="page-link" href="{{ trail.path | relative_url }}" title="{{trail.title}}">{{ trail.num }}</a>
12+
<a class="page-link" href="{{ trail.path | relative_url | remove: 'index.html' }}" title="{{trail.title}}">{{ trail.num }}</a>
1313
</li>
1414
{% endfor %}
1515
{% endif %}

0 commit comments

Comments
 (0)