Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Pagination in Jekyll using Octopress Paginate

Hi

I've been watching the Build a Blog with Jekyll and Github Pages and I have been battling my way through even though the course is to be retired soon (assume because it is outdated..).

Anyway after reading around, I am assuming Jekyll's paginate was retired as it didn't play well with other features? So I'm trying to use Octopress Paginate on my jekyll blog and so far so good.

However, I cannot seem to get pagination on the homepage?

Here is my code from a paginate.md file (which works):


title: Paginator permalink: /paginator/

paginate: true

{% for post in paginator.posts %} <li> <h2> <a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a> </h2>

    <span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
    <span class="post-meta">{{ post.author }}</span>


    <p class="post-meta">{{ post.excerpt }}</p>

  </li>

{% endfor %}

When I copy/paste this to the home.html file, it doesn't output anything? Now is this because it is a .html file or another reason? It would be great if I could get pagination working on the homepage.

Thanks in advance,

Tom