diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-08 21:12:44 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-08 21:12:44 +0300 |
commit | 67fe82f103b78ba675ad6873cfa1b1609f3a23e1 (patch) | |
tree | fd2c4a97a0bf7db5e635a1d2f74e90fd08726545 /_includes | |
parent | MathJax: get rid of the workarond (diff) | |
download | jekyll-theme-67fe82f103b78ba675ad6873cfa1b1609f3a23e1.tar.gz jekyll-theme-67fe82f103b78ba675ad6873cfa1b1609f3a23e1.zip |
paginator: fix page 1 link
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/common/paginator.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/_includes/common/paginator.html b/_includes/common/paginator.html index aaad762..d132066 100644 --- a/_includes/common/paginator.html +++ b/_includes/common/paginator.html @@ -1,4 +1,9 @@ {% if site.posts.size != 0 %} + {% if paginator.page == 1 %} + {% assign page1_url = page.url %} + {% else %} + {% assign page1_url = page.url | split: '/' | pop | join: '/' | append: '/' %} + {% endif %} <ul class="pagination"> {% if paginator.previous_page %} <li><a href="{{ site.baseurl }}{{ paginator.previous_page_path }}"><span class="glyphicon glyphicon-chevron-left"></span> Prev</a></li> @@ -9,7 +14,7 @@ {% if page_number == paginator.page %} <li class="active"><a href="#">{{ page_number }}</a></li> {% elsif page_number == 1 %} - <li><a href="{{ site.baseurl }}/">{{ page_number }}</a></li> + <li><a href="{{ site.baseurl }}{{ page1_url }}">{{ page_number }}</a></li> {% else %} <li><a href="{{ site.baseurl }}{{ site.paginate_path | replace: ':num', page_number }}">{{ page_number }}</a></li> {% endif %} |