jekyll (2)

Aggregating posts with jekyll using a custom variableMay 02, 2017

Setting up a custom variable on your posts that makes it really easy to aggregate posts on a page

Jekyll makes it super easy to create pages and posts and then loop over them to render lists of them. There are a few commands that you can utilize in Liquid to narrow down that list for only rendering a subset of posts or pages. Those are and statements. The statement lets you create new variables that can be referenced on that page as well as any include that happens on that page. And the…Keep Reading


Need to assign a new variable with a subset of an array. Insert slicing.

While liquid has a way to ensure that a for loop will exit once it hits a certain iteration. You may need to slice an array of items outside of a for loop. After some time on Google, I couldn’t find any straight forward way of getting a subset of an array in liquid. I came across a site with some unofficial documentation about strings in liquid. It said it was possible to slice strings. Knowing…Keep Reading


© Matthew Sessions 2022