-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Ability to customize slug generation #38
Comments
Welcome @Porges!
If the slug generation happens in If you need access to the slugger in |
I don’t quite understand your setup.
|
I'm using a (slightly) customized slug generation anyway, so I have access to the slug function which is lying around (it's
Unfortunately |
This feels a lot like putting the carriage in front of the horse. Yes, you could compute the slugs twice, and hope nothing has modified the content in a way that would change the slug between the two.
That sounds like a relatively quick fix on the What (I think) @wooorm's questions are largely getting at, is this project, Your use case sounds much more focused on generating HTML output, in which case, |
It also looks like |
Thanks, I'll focus my efforts over there then 🙂 |
Initial checklist
Problem
My slug generation for headers happens in the Rehype phase and not in Remark, so I can't get the identifiers added before
remark-toc
runs, and thus the identifiers are different and the links don't work. Would it be possible to add an option to customize how slugs are generated forremark-toc
?Solution
I would like to be able to override how slugs are generated.
Alternatives
I could use
remark-slug
instead ofrehype-slug
, but it is deprecated.The text was updated successfully, but these errors were encountered: