diff options
-rw-r--r-- | _includes/jekyll-theme/posts/paginator.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/_includes/jekyll-theme/posts/paginator.html b/_includes/jekyll-theme/posts/paginator.html index 341687c..268d8fd 100644 --- a/_includes/jekyll-theme/posts/paginator.html +++ b/_includes/jekyll-theme/posts/paginator.html @@ -3,6 +3,8 @@ https://jekyllrb.com/docs/pagination/. {% endcomment %} {% if site.posts.size != 0 %} + {% capture prev %}<span class="glyphicon glyphicon-chevron-left"></span> Prev{% endcapture %} + {% capture next %}Next <span class="glyphicon glyphicon-chevron-right"></span>{% endcapture %} {% comment %} Link to page 1 is tricky. If site.paginate_path is used, then we cannot simply use /. This is a silly attempt to get the proper page 1 link. @@ -15,11 +17,11 @@ <ul class="pagination"> {% if paginator.previous_page %} <li> - <a href="{{ paginator.previous_page_path | relative_url }}"><span class="glyphicon glyphicon-chevron-left"></span> Prev</a> + <a href="{{ paginator.previous_page_path | relative_url }}">{{ prev }}</a> </li> {% else %} <li class="disabled"> - <a href="#"><span class="glyphicon glyphicon-chevron-left"></span> Prev</a> + <a href="#">{{ prev }}</a> </li> {% endif %} {% for page_number in (1..paginator.total_pages) %} @@ -37,11 +39,11 @@ {% endfor %} {% if paginator.next_page %} <li> - <a href="{{ paginator.next_page_path | relative_url }}">Next <span class="glyphicon glyphicon-chevron-right"></span></a> + <a href="{{ paginator.next_page_path | relative_url }}">{{ next }}</a> </li> {% else %} <li class="disabled"> - <a href="#">Next <span class="glyphicon glyphicon-chevron-right"></span></a> + <a href="#">{{ next }}</a> </li> {% endif %} </ul> |