Jekyll collection not working on github.pages

Leahcim

Following the instructions in the Jekyll documention http://jekyllrb.com/docs/collections/, I created a collection in my jekyll blog for developer related posts

collections:
  developer:
    output: true

On a jekyll page, I try to output a list of the posts like this

  <ul class="posts">
    {% for post in site.developer %}

      <li>
        <span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
        <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>

       <p>{{ post.excerpt }}</p>
      </li>

    {% endfor %}
  </ul>

This works on my local machine. I can view one post from this collection at

http://localhost:4000/developer/2014-07-07-blah-blah.html  

and a list of the developer posts is visible on the developer page at

http://localhost:4000/developer/

However, the list isn't visible on github pages and I can't access the post at the url. The blog otherwise works fine on github pages i.e. all the site.posts on the homepage are visible etc.

Note, I did push the files to github. I can see them in the repo.

Yi Zeng

My first guess would be that "GitHub Pages" is still using an out-dated version of Jekyll.

GitHub pages' Dependency versions page shows that Jekyll 1.5.1 is used. But collections feature was introduced in Jekyll 2.0.0 by PR 2199, see Jekyll History page here.

If this is the case, then there is nothing you can do, unless you host your repository elsewhere, or push the compiled source to GitHub pages.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related