mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-24 23:16:52 +00:00
fix/slug-undefined-html
This commit is contained in:
@@ -76,12 +76,6 @@ export default async function getPageProperties(id, block, schema, authToken, ta
|
||||
// 映射值:用户个性化type和status字段的下拉框选项,在此映射回代码的英文标识
|
||||
mapProperties(properties)
|
||||
|
||||
// 开启伪静态路径
|
||||
if (BLOG.PSEUDO_STATIC) {
|
||||
if (!properties?.slug?.endsWith('.html') && !properties?.slug?.startsWith('http')) {
|
||||
properties.slug += '.html'
|
||||
}
|
||||
}
|
||||
properties.publishDate = new Date(properties?.date?.start_date || value.created_time).getTime()
|
||||
properties.publishTime = formatDate(properties.publishDate, BLOG.LANG)
|
||||
properties.lastEditedTime = formatDate(new Date(value?.last_edited_time), BLOG.LANG)
|
||||
@@ -107,6 +101,12 @@ export default async function getPageProperties(id, block, schema, authToken, ta
|
||||
}
|
||||
properties.password = properties.password ? md5(properties.slug + properties.password) : ''
|
||||
|
||||
// 开启伪静态路径
|
||||
if (JSON.parse(BLOG.PSEUDO_STATIC)) {
|
||||
if (!properties?.slug?.endsWith('.html') && !properties?.slug?.startsWith('http')) {
|
||||
properties.slug += '.html'
|
||||
}
|
||||
}
|
||||
return properties
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user