From 22f1e66710c0c56b81fd3e8defe75c6d42136951 Mon Sep 17 00:00:00 2001 From: Oliver Davies <oliver@oliverdavies.co.uk> Date: Sat, 18 Apr 2015 00:57:24 +0100 Subject: [PATCH] Include tags, and next and previous links --- .../opdavies/opdavies/_layouts/post.html.twig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/themes/opdavies/opdavies/_layouts/post.html.twig b/source/themes/opdavies/opdavies/_layouts/post.html.twig index 14333163..f9d376c2 100644 --- a/source/themes/opdavies/opdavies/_layouts/post.html.twig +++ b/source/themes/opdavies/opdavies/_layouts/post.html.twig @@ -4,5 +4,21 @@ <div class="col-md-9"> {% include 'post-header' %} {% block content %}{% endblock %} + + {% if page.tags %} + <p class="tags"> + Tags: + {% for tag in page.tags %} + <a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">{{ tag }}</a>{% if not loop.last %}, {% endif %} + {% endfor %} + </p> + {% endif %} + + {% if page.next_post or page.previous_post %} + <ul> + {% if page.next_post %}<li>Next post: <a href="{{ page.next_post.url }}">{{ page.next_post.title }}</a></li>{% endif %} + {% if page.previous_post %}<li>Previous post: <a href="{{ page.previous_post.url }}">{{ page.previous_post.title }}</a></li>{% endif %} + </ul> + {% endif %} </div>{# .col-md-9 #} {% endblock %} \ No newline at end of file