From 68c99864514369844bfd25242dee9a5db4f7a0bb Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 17 Apr 2018 23:15:00 +0100 Subject: [PATCH] Add message on old posts --- source/_layouts/post.html.twig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/_layouts/post.html.twig b/source/_layouts/post.html.twig index cc80c614..7dfd27b1 100644 --- a/source/_layouts/post.html.twig +++ b/source/_layouts/post.html.twig @@ -25,6 +25,15 @@ {% include 'post/intro-image' %}
+ {% set limit = 'now'|date_modify('-12 months')|date('U') %} + {% if page.date|date('U') < limit %} +
+

+ Warning: This post is over a year old. I don't always update old posts with new information, so some of this information may be out of date. +

+
+ {% endif %} + {% block excerpt %}{% endblock %} {% block content %}{% endblock %}