recoup8063
recoup8063

Reputation: 4280

Jekyll - Pagination issues

I am using jekyll and am trying to use pagination. From what I have read pagination can only work in html files(Like for lists). So when I went to impliment it I just went into my config.yml and added

pageinate: 5
paginate_path: "Blog/page:num"

and in Blog/ I added index.html which is simply

---
layout: blogIndex
---

the layout blogIndex contains

<!DOCTYPE HTML>
<html>
    <head>
        <title>Blog</title>
    </head>
    <body onload="init();" onresize="setSize();">
        {% include header.html %}
        <div id="page">
            <div id="content" class="{{ page.title }}">
            {% for post in paginator.posts %}
                <div class="post">
                    <a class="bTitle" href="{{post.url}}">{{post.title}}</a>
                    <div class="date">
                        {{post.date | date: "%B %-d, %Y" }}
                    </div>
                    <div class="pContent">
                        {{post.excerpt}}
                    </div>
                </div>
            {% endfor %}
             </div>
        </div>
        {% include footer.html %}
    </body>
</html>

When I generate my site and go to /Blog it does not seam to work, no posts show up when I have 12 posts created, but when I replace paginator with site it will list all my post(So its defiantly paginator that's not working). Is there something I am doing wrong or missing here?

Upvotes: 0

Views: 295

Answers (1)

franksort
franksort

Reputation: 3153

You misspelled paginate as pageinate in config.yml. It should be:

paginate: 5
paginate_path: "Blog/page:num"

Upvotes: 2

Related Questions