From c02a94c923d586f1cc99c73d5731c7ae35a4a907 Mon Sep 17 00:00:00 2001 From: anime Date: Mon, 7 Jul 2025 00:46:21 +0800 Subject: [PATCH] feat(config): add article expiration reminder configuration - Added ARTICLE_EXPIRATION_DAYS to configure expiration threshold - Added ARTICLE_EXPIRATION_MESSAGE to set custom expiration message - Added ARTICLE_EXPIRATION_ENABLED to control whether enable this feature --- conf/post.config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conf/post.config.js b/conf/post.config.js index 3e7a4ff3..8c987625 100644 --- a/conf/post.config.js +++ b/conf/post.config.js @@ -28,6 +28,16 @@ module.exports = { POST_RECOMMEND_COUNT: process.env.NEXT_PUBLIC_POST_RECOMMEND_COUNT || 6, // 推荐文章数量 POSTS_PER_PAGE: process.env.NEXT_PUBLIC_POST_PER_PAGE || 12, // post counts per page POSTS_SORT_BY: process.env.NEXT_PUBLIC_POST_SORT_BY || 'notion', // 排序方式 'date'按时间,'notion'由notion控制 + + // 文章过期提醒配置 + ARTICLE_EXPIRATION_DAYS: + process.env.NEXT_PUBLIC_ARTICLE_EXPIRATION_DAYS || 90, // 文章过期提醒阈值(天) + ARTICLE_EXPIRATION_MESSAGE: + process.env.NEXT_PUBLIC_ARTICLE_EXPIRATION_MESSAGE || + '这篇文章发布于 %%DAYS%% 天前,内容可能已过时,请谨慎参考。', // 过期提示信息,使用 %%DAYS%% 作为天数占位符 + ARTICLE_EXPIRATION_ENABLED: + process.env.NEXT_PUBLIC_ARTICLE_EXPIRATION_ENABLED || 'false', // 是否启用文章过期提醒 + POST_WAITING_TIME_FOR_404: process.env.NEXT_PUBLIC_POST_WAITING_TIME_FOR_404 || '8', // 文章加载超时时间,单位秒;超时后跳转到404页面