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
Explicit ids? #940
Comments
## 插入图片示例 {#insert-image} ## Insert Image {#insert-image} |
I do think about supporting it, currectly our logic is to apply a default slugify function on title. @meteorlxy Any suggestion with this one? |
I've noticed this before in some docs translation repo. I think users could use it with Might be a good idea to integrate it by default. |
Nope, I think that's hard. I was trying to build one long time ago, but I met some issues. |
Anyway I will relook into this, and if it can be solved at users side, I will add this to |
Well, it seems to work well here with a rough test 🤔 . |
Use vuepress-plugin-md-enhance@next, and enable attrs. |
Don't close issue too casually. We could consider to integrate it . |
Emm, I don't think this is a core feature though. We EVEN do not add full support for gfm, so what makes you reconsider this one?🧐 |
Also, the original markdown-it-attrs should be modified to only suppor heading ids, or it may breaks peoples markdown content. After I support attrs yesterday, I already received a report saying that his content is parsed incorrectly today hours ago, and some content are parsed as attrs. Anyway if you do think that we need heading ids, I can open a pr to support that. |
Meanwhile, I would also consider features like link-checking or gfm are more important than this one. If you still want to enlarge core markdown features, I would suggest adding these as well. |
As we are providing i18n support out-of-the-box, it's helpful when switching languages and keep the current hash. |
Any suggestions about the above one? Some users complain that they can't keep markdown file as is from github markdown to our tool. Also the image link discussed in the other issue is also a big problem. |
This way of marking does not break the Markdown syntax. |
Nice idea, it also does not break tools like prettier or markdownlint. Actually we can just keep that syntax, becase we can use The problem is that it adds support in many places, see https://vuepress-theme-hope.github.io/v2/md-enhance/guide/attrs.html#demo. If we include it as is, the chance breaking user content might be a little high, as it's possible for user content to include |
Update here, md-enhance already support attrs. See https://vuepress-theme-hope.github.io/v2/md-enhance/guide/attrs.html#demo to use this. So if this needs to be added in core just copy my code. |
Clear and concise description of the problem
want to explicitly set the id attribute of headings from the Markdown document, for example to keep them consistent across translations.
Suggested solution
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: