Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【支持脚注】同页面内block link跳转到指定位置 #1030

Closed
zfhxi opened this issue May 5, 2023 · 1 comment
Closed

【支持脚注】同页面内block link跳转到指定位置 #1030

zfhxi opened this issue May 5, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@zfhxi
Copy link

zfhxi commented May 5, 2023

描述bug

在我的文章中,有些文字的描述是参考了一些文献的,所以我希望在引用处添加脚注。
然而Notion不支持脚注,我是通过"Copy link to block"获取块访问链接,然后在引用处添加这个链接,比如这篇文章的“文献[1]”添加了链接https://foil-saturnalia-95a.notion.site/Sinkhorn-Distance-9560982f02c54d45a77a735537dcd39e#f50f688882954dd1b170467685cef676

然而部署后,上述link被NotionNext渲染为:

<a class="notion-link" href="/9560982f02c54d45a77a735537dcd39e#f50f688882954dd1b170467685cef676">[1]</a>

这样点击“文献[1]”,实际是打开了新页面:https://idzc.top/9560982f02c54d45a77a735537dcd39e#f50f688882954dd1b170467685cef676

复现步骤
描述bug

期望的正常结果
期望NotionNext渲染成:

<a class="notion-link" href="#f50f688882954dd1b170467685cef676">[1]</a>

并且对应的block(第一篇参考文献位置所在的block)可以渲染为id="#f50f688882954dd1b170467685cef676"的元素。

这样点击“文献[1]”,将跳转到:
https://idzc.top/article/202305042300#f50f688882954dd1b170467685cef676

截图

环境

  • 操作系统: [macOS]
  • 浏览器 [例如. chrome]
  • 版本 [Version 112.0.5615.121 (Official Build) (arm64)]

补充说明
暂无

@zfhxi zfhxi added the bug Something isn't working label May 5, 2023
@tangly1024 tangly1024 changed the title 同页面的block link跳转问题 【支持脚注】同页面的block link跳转问题 May 16, 2023
@tangly1024 tangly1024 added the enhancement New feature or request label May 16, 2023
@tangly1024
Copy link
Owner

  1. 对应的block(第一篇参考文献位置所在的block)可以渲染为id="#f50f688882954dd1b170467685cef676"的元素。
    将文献格式设置为 header(建议设置为二级标题),即可实现 id="#f50f688882954dd1b170467685cef676"

"Copy link to block"获取块访问链接,然后在引用处添加这个链接
获取后的链接需要加工一下 保留 #号开始的内容
image

不过,点击文献[1],会在新窗口中打开,而不是在当前页面跳转,要实现该功能,需要改动代码

@tangly1024 tangly1024 removed the bug Something isn't working label Jun 28, 2023
@tangly1024 tangly1024 changed the title 【支持脚注】同页面的block link跳转问题 【支持脚注】同页面内block link跳转到指定位置 Jun 28, 2023
Repository owner locked and limited conversation to collaborators Mar 5, 2024
@tangly1024 tangly1024 converted this issue into discussion #2056 Mar 5, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants