Add previous/next navigation to posts
This commit is contained in:
@@ -12,6 +12,19 @@
|
|||||||
<a href="{{ page.code }}"><img alt="code" height="49" src="{{ site.static_prefix }}/icon/code.png" width="49" /></a>
|
<a href="{{ page.code }}"><img alt="code" height="49" src="{{ site.static_prefix }}/icon/code.png" width="49" /></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
<ul style="margin-top: 0;">
|
||||||
|
{% if page.previous %}
|
||||||
|
<li><a href="/{{ site.baseurl }}{{ page.previous.url }}" rel="prev"> ← {{ page.previous.title }} </a></li>
|
||||||
|
{% else %}
|
||||||
|
<li><span class="noanchor"> ← </span></li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if page.next %}
|
||||||
|
<li><a href="/{{ site.baseurl }}{{ page.next.url }}" rel="next"> {{ page.next.title }} → </a></li>
|
||||||
|
{% else %}
|
||||||
|
<li><span class="noanchor"> → </span></li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
<h1>
|
<h1>
|
||||||
<span itemprop="name">{{ page.title }}</span>
|
<span itemprop="name">{{ page.title }}</span>
|
||||||
<small class="print-only" itemprop="datePublished" content="{{ page.date|date:'%F') }}">{{ page.date|date:'%A, %B %d, %Y' }}</small>
|
<small class="print-only" itemprop="datePublished" content="{{ page.date|date:'%F') }}">{{ page.date|date:'%A, %B %d, %Y' }}</small>
|
||||||
|
|||||||
Reference in New Issue
Block a user