mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 23:16:49 +00:00
文章自动上下架功能调试
This commit is contained in:
@@ -34,6 +34,7 @@ export const siteConfig = (key, defaultVal = null, extendConfig = {}) => {
|
||||
case 'POST_LIST_STYLE':
|
||||
case 'POST_LIST_PREVIEW':
|
||||
case 'POST_URL_PREFIX_MAPPING_CATEGORY':
|
||||
case 'POST_SCHEDULE_PUBLISH':
|
||||
case 'IS_TAG_COLOR_DISTINGUISHED':
|
||||
case 'TAG_SORT_BY_COUNT':
|
||||
case 'THEME':
|
||||
|
||||
@@ -236,7 +236,7 @@ async function converNotionToSiteDate(pageId, from, pageRecordMap) {
|
||||
|
||||
// 新特性,判断文章的发布和下架时间,如果不在有效期内则进行下架处理
|
||||
const publish = isInRange(post.date)
|
||||
if (!publish) {
|
||||
if (!publish && siteConfig('POST_SCHEDULE_PUBLISH', '', NOTION_CONFIG)) {
|
||||
console.log(post.title, '未处于发布时段 [', post.date, '] 内,将强制隐藏')
|
||||
// 隐藏
|
||||
post.status = 'Invisible'
|
||||
|
||||
Reference in New Issue
Block a user