mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-31 15:10:11 +00:00
从Notion表格读取配置信息
This commit is contained in:
@@ -6,6 +6,15 @@ import formatDate from '../formatDate'
|
||||
import md5 from 'js-md5'
|
||||
import { mapImgUrl } from './mapImage'
|
||||
|
||||
/**
|
||||
* 获取页面元素成员属性
|
||||
* @param {*} id
|
||||
* @param {*} block
|
||||
* @param {*} schema
|
||||
* @param {*} authToken
|
||||
* @param {*} tagOptions
|
||||
* @returns
|
||||
*/
|
||||
export default async function getPageProperties(id, block, schema, authToken, tagOptions) {
|
||||
const rawProperties = Object.entries(block?.[id]?.value?.properties || [])
|
||||
const excludeProperties = ['date', 'select', 'multi_select', 'person']
|
||||
@@ -108,6 +117,7 @@ export default async function getPageProperties(id, block, schema, authToken, ta
|
||||
properties.slug += '.html'
|
||||
}
|
||||
}
|
||||
// 密码字段md5
|
||||
properties.password = properties.password ? md5(properties.slug + properties.password) : ''
|
||||
return properties
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user