内部引用链接可以跳转

This commit is contained in:
tangly1024
2022-04-25 16:01:48 +08:00
parent 24ab925cdd
commit 87440ea140
3 changed files with 22 additions and 4 deletions

View File

@@ -75,8 +75,14 @@ const NotionPage = ({ post }) => {
</div>
}
/**
* 将id映射成博文内部链接。
* @param {*} id
* @returns
*/
const mapPageUrl = id => {
return 'https://www.notion.so/' + id.replace(/-/g, '')
// return 'https://www.notion.so/' + id.replace(/-/g, '')
return '/article/' + id.replace(/-/g, '')
}
function getMediumZoomMargin() {