-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Jekyll+Redcarpet - auto add IDs to headings? #1249
Comments
Hey @nottrobin, I believe you would want to do this with liquid and if it were me I would attempt to do it with captures. You can read more about captures in liquid here: |
See the redcarpet README:
This kind of options can be passed via |
Thanks @maul-esel I didn't know about that - I think that's the best solution. Ideally the IDs would be more semantic (e.g. For anyone else with the same problem, I added it onto my markdown: redcarpet
redcarpet:
extensions: [with_toc_data] If anyone did want to implement a more semantic solution, I imagine one should start with editing the html.c file in the Sundown project. |
Hi @nottrobin |
Sorry for reopen this thread.
And rdiscount auto add id for headers. But, unfortunately it generates the same id for all headers, which makes all the toc items point to the same anchor. Do you have some ideas about it? Thanks in advance! |
no idea sorry 😞 |
@lengerfulluse Please bring that up with the Rdiscount folks: https://github.com/davidfstr/rdiscount/issues 👋 @maul-esel, long time no see! |
Thanks @parkr, I just submit a new issue: davidfstr/rdiscount#129. Will keep this thread close. |
Is there a way with Redcarpet and Jekyll to automatically add IDs to headings?
I've tried googling lots and lots but haven't found any answer.
The text was updated successfully, but these errors were encountered: