Added links to next/previous post

Added some subtle links to the next and previous posts.
Turns out this is a built-in feature of Jekyll, which I never thought about using so far :-)

Here's the snippet which I just added to my custom post layout template:

<footer class="navfooter">
<nav>
{%- if page.next.url %}
<a rel="next" href="{{ site.url }}{{ page.next.url }}" title="{{ page.next.title | strip_html | escape_once }}">&larr;</a>
{% endif -%}
{%- if page.previous.url %}
<a rel="prev" href="{{ site.url }}{{ page.previous.url }}" title="{{ page.previous.title | strip_html | escape_once }}">&rarr;</a>
{% endif -%}
</nav>
</footer>

(Only thing left now, is to tame the ugly Discus comments section so these links become more visible…)

blog comments powered by Disqus