-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Slugify 生成重复的锚点 #4803
Comments
https://markdown-it.github.io/ markdown-it 并不是生成AST, 这样子的话相关功能实现起来会有点困难 |
@DIYgod 研究了一下, 现在有两种解决方案
类似
重新实现一套 https://github.com/valeriangalliat/markdown-it-anchor
|
顺便提一下, netlify 生成文档的preview应当保留 (看了一下检查, 似乎是被移除了) |
试了下,看起来没什么问题,辛苦~ |
配额不够了,不关要扣 7 刀了 |
@DIYgod https://www.netlify.com/legal/open-source-policy/ |
由于 Slugify 生成锚点时仅使用当前标题
在文档中, 部分分类中的二级标题由于类型一致会导致生成相同的锚点
Related:
建议
唯一化锚点, 用remark走一下语法树,slugify单独使用1-2级标题生成
相关项目
https://github.com/remarkjs/remark-slug
The text was updated successfully, but these errors were encountered: