diff options
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/jekyll-theme/posts/paginator.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/_includes/jekyll-theme/posts/paginator.html b/_includes/jekyll-theme/posts/paginator.html index d1d6072..1525868 100644 --- a/_includes/jekyll-theme/posts/paginator.html +++ b/_includes/jekyll-theme/posts/paginator.html @@ -2,9 +2,12 @@ Page links, inspired by the example at the bottom of 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. @@ -14,6 +17,7 @@ {% else %} {% assign page1_url = page.url | split: '/' | pop | join: '/' | append: '/' %} {% endif %} + <ul class="pagination"> {% if paginator.previous_page %} <li> @@ -49,4 +53,5 @@ </li> {% endif %} </ul> + {% endif %} |