diff --git a/_config.yml b/_config.yml
index 529e3956..ffec4f7a 100644
--- a/_config.yml
+++ b/_config.yml
@@ -578,6 +578,17 @@ post:
# Options: busuanzi | leancloud
source: "busuanzi"
+ # 在文章开头显示文章过期/时效提示
+ # Display expiration/expiration notification at the beginning of the article
+ outdate:
+ enable: false
+ # 文章时效提示使用警告样式的天数,超过此天数显示警告样式的note
+ # The number of days for the article's timeliness prompt to use warning style, exceeding this number of days will display warning style notes
+ warning_day: 200
+ # 文章时效提示使用错误样式的天数,超过此天数显示错误样式的note
+ # The number of days for the article's timeliness prompt to use the wrong style. If this number is exceeded, a note with the wrong style will be displayed
+ error_day: 400
+
# 在文章开头显示文章更新时间,该时间默认是 md 文件更新时间,可通过 front-matter 中 `updated` 手动指定(和 date 一样格式)
# Update date is displayed at the beginning of the post. The default date is the update date of the md file, which can be manually specified by `updated` in front-matter (same format as date)
updated:
diff --git a/languages/de.yml b/languages/de.yml
index 753801bd..c7b2876e 100644
--- a/languages/de.yml
+++ b/languages/de.yml
@@ -43,6 +43,9 @@ post:
prev_post: 'Vorheriger'
next_post: 'Nächster'
updated: 'Geändert am %s'
+ outdate:
+ title: 'Rechtzeitigkeitserinnerung für Artikel'
+ content: 'Dies ist ein Artikel, der vor %s Tagen veröffentlicht wurde, und einige Informationen könnten sich geändert haben.'
meta:
wordcount: '%s wörter'
min2read: '%s minuten'
diff --git a/languages/en.yml b/languages/en.yml
index 20775b51..a9f50a25 100644
--- a/languages/en.yml
+++ b/languages/en.yml
@@ -43,6 +43,9 @@ post:
prev_post: 'Previous'
next_post: 'Next'
updated: 'Last updated on %s'
+ outdate:
+ title: 'Timeliness reminder for articles'
+ content: 'This is an article published %s days ago, and some information may have changed. Please pay attention to discernment.'
meta:
wordcount: '%s words'
min2read: '%s mins'
diff --git a/languages/eo.yml b/languages/eo.yml
index 716fca63..e1e625c8 100644
--- a/languages/eo.yml
+++ b/languages/eo.yml
@@ -43,6 +43,9 @@ post:
prev_post: 'Antaŭa afiŝo'
next_post: 'Sekva afiŝo'
updated: 'Aktualizita: %s'
+ outdate:
+ title: '@ info: whatsthis'
+ content: 'Tio estas artiklo publikigita antaŭ la %s tagoj, kaj kelkaj informoj eble ŝan ĝiĝis. Bonvolu atenti la malprudentecon.'
meta:
wordcount: '%s vortoj'
min2read: '%s minutoj'
diff --git a/languages/es.yml b/languages/es.yml
index 9aa4da9d..5ff07835 100644
--- a/languages/es.yml
+++ b/languages/es.yml
@@ -43,6 +43,9 @@ post:
prev_post: 'Anterior'
next_post: 'Siguiente'
updated: 'Última actualización el %s'
+ outdate:
+ title: 'Consejos de puntualidad del artículo'
+ content: 'Este es un artículo publicado hace %s días, y parte de la información puede haber cambiado, preste atención a la selección.'
meta:
wordcount: '%s palabras'
min2read: '%s minutos'
diff --git a/languages/ja.yml b/languages/ja.yml
index 4584ce8a..c632517c 100644
--- a/languages/ja.yml
+++ b/languages/ja.yml
@@ -43,6 +43,9 @@ post:
prev_post: '前の記事'
next_post: '次の記事'
updated: '最終更新日:%s'
+ outdate:
+ title: '記事の有効性のヒント'
+ content: 'これは%sに掲載される前の記事で、一部の情報が変更されている可能性がありますので、識別に注意してください。'
meta:
wordcount: '%s 単語'
min2read: '%s 分'
diff --git a/languages/ru.yml b/languages/ru.yml
index 11837bab..fae37957 100644
--- a/languages/ru.yml
+++ b/languages/ru.yml
@@ -43,6 +43,9 @@ post:
prev_post: 'Предыдущий'
next_post: 'Следующий'
updated: 'Последнее обновление %s'
+ outdate:
+ title: 'Настройка статьи'
+ content: 'Это статья, опубликованная %s ранее, часть информации может измениться, обратите внимание на скрининг.'
meta:
wordcount: '%s слов'
min2read: '%s минут'
diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml
index 376ab820..00eb9db9 100644
--- a/languages/zh-CN.yml
+++ b/languages/zh-CN.yml
@@ -43,6 +43,9 @@ post:
prev_post: '上一篇'
next_post: '下一篇'
updated: '本文最后更新于 %s'
+ outdate:
+ title: '文章时效性提示'
+ content: '这是一篇发布于%s天前的文章,部分信息可能已发生改变,请注意甄别。'
meta:
wordcount: '%s 字'
min2read: '%s 分钟'
diff --git a/languages/zh-HK.yml b/languages/zh-HK.yml
index a682f6d5..09ccdabc 100644
--- a/languages/zh-HK.yml
+++ b/languages/zh-HK.yml
@@ -43,6 +43,9 @@ post:
prev_post: '上一篇'
next_post: '下一篇'
updated: '本文最後更新於:%s'
+ outdate:
+ title: '文章時效性提示'
+ content: '這是一篇發佈於%s天前的文章,部分資訊可能已發生改變,請注意甄別。'
meta:
wordcount: '%s 字'
min2read: '%s 分鐘'
diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml
index db8dd416..755871b2 100644
--- a/languages/zh-TW.yml
+++ b/languages/zh-TW.yml
@@ -43,6 +43,9 @@ post:
prev_post: '上一篇'
next_post: '下一篇'
updated: '本文最後更新於:%s'
+ outdate:
+ title: '文章時效性提示'
+ content: '這是一篇發佈於%s天前的文章,部分資訊可能已發生改變,請注意甄別。'
meta:
wordcount: '%s 字'
min2read: '%s 分鐘'
diff --git a/layout/post.ejs b/layout/post.ejs
index 9dee4076..b0305140 100644
--- a/layout/post.ejs
+++ b/layout/post.ejs
@@ -15,6 +15,20 @@ page.banner_mask_alpha = page.banner_mask_alpha || theme.post.banner_mask_alpha
+ <% let interval = parseInt(Date.now() - new Date(page.date)) %>
+ <% if (theme.post.outdate.enable) { %>
+ <% if (interval > theme.post.outdate.warning_day * 3600 * 24 * 1000 && interval < theme.post.outdate.error_day * 3600 * 24 * 1000) { %>
+
+
<%- __('post.outdate.title') %>
+
<%- __('post.outdate.content', parseInt(interval / 86400000)) %>
+
+ <% } else if(interval > theme.post.outdate.error_day * 3600 * 24 * 1000) { %>
+
+
<%- __('post.outdate.title') %>
+
<%- __('post.outdate.content', parseInt(interval / 86400000)) %>
+
+ <% } %>
+ <% } %>
<% if (theme.post.updated.enable && theme.post.updated && compare_date(page.date, page.updated)) { %>
<% if (theme.post.updated.relative) { %>