+ <% if (theme.outdate.enable) { %>
+
+ <% } %>
<% if (post.excerpt && index) { %>
<%- post.excerpt %>
<% if (theme.excerpt_link) { %>
diff --git a/layout/_partial/post/date.ejs b/layout/_partial/post/date.ejs
index 71f88e0..5417811 100644
--- a/layout/_partial/post/date.ejs
+++ b/layout/_partial/post/date.ejs
@@ -1,5 +1,6 @@
diff --git a/scripts/helper/config.js b/scripts/helper/config.js
index 35f76c8..0a6b8cf 100644
--- a/scripts/helper/config.js
+++ b/scripts/helper/config.js
@@ -4,6 +4,7 @@ hexo.extend.helper.register("themeConfig", () => {
const { config } = hexo.theme;
const icon_font = config.icon_font;
const clipboard_tips = config.clipboard;
+ const outdate = config.outdate;
const _global = [];
if (icon_font) {
_global.push(`window.icon_font = '${icon_font}';`);
@@ -14,6 +15,9 @@ hexo.extend.helper.register("themeConfig", () => {
if (config.service_worker.enable) {
_global.push(`window.swPath = '${url_for.call(hexo, "/sw.js")}';`);
}
+ if (outdate.enable) {
+ _global.push(`window.outdate = ${JSON.stringify(outdate)};`);
+ }
return `
`;
diff --git a/scripts/helper/outdate.js b/scripts/helper/outdate.js
new file mode 100644
index 0000000..adc1fd1
--- /dev/null
+++ b/scripts/helper/outdate.js
@@ -0,0 +1,26 @@
+hexo.extend.helper.register("outdate", () => {
+ const { config } = hexo.theme;
+ if (config.outdate?.enable) {
+ return `
+`;
+ }
+ return "";
+});
\ No newline at end of file