Development Tips

Some usefull tricks for OSX People.

Show Categories and Post Count in Octopress

| Comments

Wouldn’t it be great to have Categories page in Octopress ? If so, create a new page for Categories:

New Octopress page
1
rake new_page[blog/categories]

Open blog/categories/index.markdown and insert this snippet:

Categories
1
2
3
4
5
<ul>
{% for item in site.categories %}
    <li><a href="/blog/categories/{{ item[0] }}/">{{ item[0] | capitalize }}</a> [ {{ item[1].size }} ]</li>
{% endfor %}
</ul>

If you like to see the result, check out my Categories page .

For the record, thanks to Jim Pravetz for the Liquid Syntax tip .

Comments