Skip to content
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

文档名去掉 _id.sy #723

Closed
2 tasks done
88250 opened this issue Dec 13, 2020 · 3 comments
Closed
2 tasks done

文档名去掉 _id.sy #723

88250 opened this issue Dec 13, 2020 · 3 comments
Assignees
Milestone

Comments

@88250
Copy link
Member

88250 commented Dec 13, 2020

背景

目前文档块 id 是放在文件名上的,该设计存在一些缺陷:

  • 无法支持文档块书签,因为书签元数据没有地方存储
  • 从外部文件管理器浏览时视觉干扰太多

方案

  • 通过 kramdown 内联属性列表语法来将文档块 id 移动到文档正文内容底部进行存储 {: id="" type="doc" bookmark=""}
  • 自动迁移老数据格式
@88250 88250 self-assigned this Dec 13, 2020
@88250 88250 added this to the 0.5.4 milestone Dec 13, 2020
@88250 88250 changed the title 文档块将 id 从文件名上移到内容中 文档名去掉 _id.sy Dec 13, 2020
@ListenV
Copy link

ListenV commented Dec 14, 2020

感觉可以只把_id去掉
因为原本文件中包含很多id段
这些id段不符合markdown规范的

所以采用 .sy.md 作为拓展格式,可能会好一点

@88250
Copy link
Member Author

88250 commented Dec 14, 2020

@skyls03 这个 issue 是去除文档名的,不是内容中的 ID,内容中的 ID 是去不掉的……

@ListenV
Copy link

ListenV commented Dec 14, 2020

@88250 id是实现块内容的基础,肯定是不能去掉,这我是知道的。

我的意思是文件名中的id可以去掉,但是文件内容中的id是不符合md规范。
如果继续使用.md格式,有点不好,因为用别的编辑器打开后,有很多乱七八糟的id,不是markdown该有的样子。
所以可以使用.sy.md后缀就可能比较严谨合理一些,毕竟文件内容中的id部分是思源独有的。
例子:

  • 原本的文件名:文章_idxxxxxxx.sy.md
  • 作者想要改的文件名:文章.md
  • 我推介的格式:文章.sy.md

当然这种事情无所谓啦,什么格式都行

@88250 88250 closed this as completed Dec 14, 2020
88250 added a commit to siyuan-note/appearance that referenced this issue Dec 14, 2020
@Vanessa219 Vanessa219 self-assigned this Dec 14, 2020
88250 added a commit to siyuan-note/user-guide-en_US that referenced this issue Dec 14, 2020
88250 added a commit to siyuan-note/user-guide-zh_CN that referenced this issue Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants