{% assign entries = site.posts | where: "aut", page.aut %} {% for entry in entries %} {% if entry.id == page.id %} {% assign this_index = forloop.index0 | to_integer %} {% break %} {% endif %} {% endfor %} {% assign next_index = this_index | minus: 1 %} {% assign prev_index = this_index | plus: 1 %} {% if prev_index < entries.size %} Previous {% endif %} Journal Index {% if next_index >= 0 %} Next {% endif %}