File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ collections:
3737 output : true
3838 permalink : /:collection/:year-:month-:day-:title
3939
40+ expiry_months : 12
41+
4042feed :
4143 path : atom.xml
4244 collections :
Original file line number Diff line number Diff line change 66 {%- include nav.html -%}
77
88 < main id ="main ">
9+
10+ {% if page.collection == "posts" %}
11+ {% assign page_ts = page.date | date: '%s' %}
12+ {% assign site_ts = site.time | date: '%s' %}
13+ {% assign difference = site_ts | minus: page_ts %}
14+ {% assign expiry_ts = site.expiry_months | times: 2628000 %}
15+ {% if difference > expiry_ts %}
16+
17+ < blockquote >
18+ This post is more than {{ difference | divided_by: 2628000 }} months old. The
19+ contents may no longer be correct. You should check
20+ < a href ="/news "> newer posts</ a > or refer to our
21+ < a href ="/guides "> guides section</ a > to verify details.
22+ </ blockquote >
23+
24+ {% endif %}
25+ {% endif %}
26+
927 {%- include article.html article=page -%}
1028 </ main >
1129
You can’t perform that action at this time.
0 commit comments