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
This commit is contained in:
anime
2025-07-07 00:46:21 +08:00
parent 7e79987795
commit c02a94c923

View File

@@ -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页面