Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work with collections #11

Open
franzos opened this issue Feb 5, 2015 · 1 comment
Open

Make it work with collections #11

franzos opened this issue Feb 5, 2015 · 1 comment

Comments

@franzos
Copy link

franzos commented Feb 5, 2015

I'm just getting started with Jekyll so excuse if this is easy to accomplish: I've already generated category pages for my blog - this worked great. However, I would also like to create category pages for a collection. Is this possible?

@shigeya
Copy link
Owner

shigeya commented Feb 11, 2015

Sorry to late reply. I've been traveling. Anyway, I have created such a page and easy, like following.
This file is saved as file blog/categories.html. I also created and using page layout and referred from this template but its almost same as default.

---
layout: page
title: Categories
header: Posts By Category
group: navigation
---
{% include JB/setup %}

<ul class="tag_box inline">
  {% assign categories_list = site.categories %}
  {% include JB/categories_list %}
</ul>


{% for category in site.categories %}
  <h2 id="{{ category[0] }}-ref">{{ category[0] | join: "/" }}</h2>
  <ul>
    {% assign pages_list = category[1] %}
    {% include JB/pages_list %}
  </ul>
{% endfor %}

hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants