fix paginator
This commit is contained in:
parent
fe64fdb136
commit
bc949eca5d
@ -42,7 +42,7 @@ rdiscount:
|
|||||||
highlighter: pygments # default python pygments have been replaced by pygments.rb
|
highlighter: pygments # default python pygments have been replaced by pygments.rb
|
||||||
|
|
||||||
paginate: 10 # Posts per page on the blog index
|
paginate: 10 # Posts per page on the blog index
|
||||||
pagination_dir: # Directory base for pagination URLs eg. /blog/page/2/
|
paginate_path: "posts/:num" # Directory base for pagination URLs eg. /blog/page/2/
|
||||||
recent_posts: 5 # Posts in the sidebar Recent Posts section
|
recent_posts: 5 # Posts in the sidebar Recent Posts section
|
||||||
excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles
|
excerpt_link: "Read on →" # "Continue reading" link text at the bottom of excerpted articles
|
||||||
excerpt_separator: "<!--more-->"
|
excerpt_separator: "<!--more-->"
|
||||||
|
@ -9,10 +9,14 @@ layout: default
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
<nav id="pagenavi">
|
<nav id="pagenavi">
|
||||||
{% if paginator.previous_page %}
|
{% if paginator.previous_page %}
|
||||||
<a href="{{paginator.previous_page}}" class="prev">Prev</a>
|
{% if paginator.previous_page == 1 %}
|
||||||
|
<a href="{{ root_url }}/" class="prev">Prev</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ root_url }}/posts/{{paginator.previous_page}}" class="prev">Prev</a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if paginator.next_page %}
|
{% if paginator.next_page %}
|
||||||
<a href="{{paginator.next_page}}" class="next">Next</a>
|
<a href="{{ root_url }}/posts/{{paginator.next_page}}" class="next">Next</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="center"><a href="{{ root_url }}/archives">Blog Archives</a></div>
|
<div class="center"><a href="{{ root_url }}/archives">Blog Archives</a></div>
|
||||||
</nav>
|
</nav>
|
||||||
|
Loading…
Reference in New Issue
Block a user