{% assign posts1 = "" | split: "" %} {% assign posts2 = "" | split: "" %} {% for post in include.posts %} {% if post.pin %} {% assign posts1 = posts1 | push: post %} {% else %} {% assign posts2 = posts2 | push: post %} {% endif %} {% endfor %} {% assign posts = posts1 | concat: posts2 %} {% if page.type == "home" %} {% assign offset = paginator.page | minus: 1 | times: paginator.per_page %} {% assign count = paginator.posts | size | minus: 1 %} {% assign minIndex = offset %} {% assign maxIndex = offset | plus: count %} {% else %} {% assign minIndex = 0 %} {% assign maxIndex = posts.size | minus: 1 %} {% endif %} {% for index in (minIndex..maxIndex) %}{% assign post = posts[index] %}