问题
I'm working with jekyll but the pagination not working, I thing that I'm doing all ok from official page.
_config.yml
paginate: 3
Gemfile gem 'jekyll-paginate'
Index.html
{% if paginator.total_pages > 1 %} FUNCIONA!!!
{% else %} NOT WORKING {% else %}
{% endif %}
{% for post in paginator.posts %}
hello3
{% endfor %}
{% for post in site.posts %}
hello1
{% endfor %}
The posts are .md, is a problem?
回答1:
Try this:
In _config.yaml
replace the existing single line paginate
declaration with these three lines:
gems: [jekyll-paginate]
paginate: 3
paginate_path: "page:num"
来源:https://stackoverflow.com/questions/33565601/jekyll-pagination-not-working