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

11 lines
308 B
Twig
Raw Normal View History

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