oliverdavies.uk/source/_partials/latest-posts.html

12 lines
307 B
HTML
Raw Normal View History

2015-04-01 00:03:45 +01:00
{% if data.posts %}
2015-06-14 03:27:41 +01:00
<section class="latest-posts">
<h2>Latest Posts</h2>
2015-04-01 00:03:45 +01:00
2015-06-14 03:27:41 +01:00
<ul>
2015-06-16 18:39:59 +01:00
{% for post in data.posts|slice(0,5) %}
2015-06-14 03:27:41 +01:00
<li{% if page.url == post.url %} class="active"{% endif %}><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</section>
{% endif %}