Jekyll Paginator not working

html, jekyll, liquid, pagination

Solution

Pagination in Jekyll only works in an index.html file. If you have other pages in the root of your project folder (say, about.html, poems.html) pagination will NOT work in them.

To have pagination work in another page other than your index.html, create a new folder for that page (say, poems/) and change what would have been "poems.html" to "poems/index.html". After that, your "paginate_path" in _config.yml should be 'paginate_path: "poems/page:num/"'.

I'm still investigating this issue. My site needs pagination on multiple pages...something which Jekyll doesn't seem to support out-of-the-box

Problem

I am currently working on a jekyll based homepage and I cant get pagination working. ``` <ul class="posts"> {% for post in paginator.posts %} <li> <span class="list_date">{{ post.date | date_to_string }}</span> &raquo; <span class="list_title"> {{ post.title }} </span><br> <span class="list_content">{{ post.content | strip_html | truncatewords:35}}</span> <a href="{{ post.url }}">more...</a> </li> {% endfor %} </ul> ``` This is my liquid code and it works perfectly well when using site instead of paginator. Also in my _config.yml I have this part: ``` paginate: 2 paginator_path: "news/page:num" ``` Since the index.html file is in the news folder

Original source

Related problems