I want to display my blog posts in a 3x2x3 grid layout where the first row has 3 posts, the second row has 2 posts, and the third row has 3 posts. My method is just repeating the for loop using limit and offset to filter it. Trying to figure out a more elegant method to do this without using so many for loop.
Code
<div class='container'>
<div class='row'>
{% for post in site.posts limit: 3 %}
<div class='col-sm-6 col-md-4'>
<p>{{ post.title }}</p>
</div>
{% endfor %}
{% for post in site.posts limit: 2 offset: 3 %}
<div class='col-sm-6'>
<p>{{ post.title }}</p>
</div>
{% endfor %}
{% for post in site.posts limit: 3 offset: 5 %}
<div class='col-sm-6 col-md-4'>
<p>{{ post.title }}</p>
</div>
{% endfor %}
</div>
</div>