pretzel icon indicating copy to clipboard operation
pretzel copied to clipboard

Support for Jekyll categories

Open shiftkey opened this issue 13 years ago • 3 comments

Should be available in Liquid Templates:

https://github.com/Code52/pretzel/blob/master/src/Pretzel.Logic/Templating/Jekyll/LiquidEngine.cs#L53

  • Test that SiteContext populates posts based on category
  • Test that template can render all categories associated with a post
  • Test that template can render all posts belonging to a category

shiftkey avatar Apr 30 '12 01:04 shiftkey

I'm looking to be able to return a list of posts based on a category. Something like:

<% for post in site.categories.news %> {{content}} <% endfor %>

where "news" is the category

markgrovs avatar Apr 30 '12 02:04 markgrovs

{% for post in site.categories.foo %} {{post.content}} {% endfor %}

Have this working locally, will test with a real site tonight and confirm

shiftkey avatar Apr 30 '12 02:04 shiftkey

Is there a way to render a list of categories on my homepage?

i've tried: {% for category in site.categories %}

  • {{ category | first }} {% endfor %}

    Thanks for any help you can give me!! Rob

  • robertbird avatar Feb 27 '15 22:02 robertbird