mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-09 15:10:39 +00:00
Merge pull request #1817 from siuze/patch-1
fix bug: 自定义数据库type字段属性后无法正确生成未显式定义slug的文章的路径
This commit is contained in:
@@ -101,11 +101,11 @@ export default async function getPageProperties(id, block, schema, authToken, ta
|
|||||||
delete properties.content
|
delete properties.content
|
||||||
|
|
||||||
// 处理URL
|
// 处理URL
|
||||||
if (properties.type === BLOG.NOTION_PROPERTY_NAME.type_post) {
|
if (properties.type === 'Post') {
|
||||||
properties.slug = (BLOG.POST_URL_PREFIX) ? generateCustomizeUrl(properties) : (properties.slug ?? properties.id)
|
properties.slug = (BLOG.POST_URL_PREFIX) ? generateCustomizeUrl(properties) : (properties.slug ?? properties.id)
|
||||||
} else if (properties.type === BLOG.NOTION_PROPERTY_NAME.type_page) {
|
} else if (properties.type === 'Page') {
|
||||||
properties.slug = properties.slug ?? properties.id
|
properties.slug = properties.slug ?? properties.id
|
||||||
} else if (properties.type === BLOG.NOTION_PROPERTY_NAME.type_menu || properties.type === BLOG.NOTION_PROPERTY_NAME.type_sub_menu) {
|
} else if (properties.type === 'Menu' || properties.type === 'SubMenu') {
|
||||||
// 菜单路径为空、作为可展开菜单使用
|
// 菜单路径为空、作为可展开菜单使用
|
||||||
properties.to = properties.slug ?? '#'
|
properties.to = properties.slug ?? '#'
|
||||||
properties.name = properties.title ?? ''
|
properties.name = properties.title ?? ''
|
||||||
|
|||||||
Reference in New Issue
Block a user