<footer>
{% 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 %}
	<span class="previous">
		<a href="{{ entries[prev_index].url }}">Previous</a>
	</span>
{% endif %}
	<span class="home">
		<a href="/journals/{{ page.aut }}">Journal Index</a>
	</span>
{% if next_index >= 0 %}
	<span class="next">
		<a href="{{ entries[next_index].url }}">Next</a>
	</span>
{% endif %}
</footer>
