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

Heading Links #11

Closed
abbeyperini opened this issue Nov 18, 2021 · 2 comments
Closed

Heading Links #11

abbeyperini opened this issue Nov 18, 2021 · 2 comments

Comments

@abbeyperini
Copy link
Owner

abbeyperini commented Nov 18, 2021

Because react-markdown does not parse heading anchors, I'm getting "target source does not exist" errors for my table of contents links and they do not work. I tried a handful of solutions, and there are more listed in the issues, including remark and rehype plugins that are deprecated or involve installing multiple plugins like https://github.com/remarkjs/remark-toc

@AlexMNet
Copy link

AlexMNet commented Dec 2, 2021

I just stumbled across your post while trying to figure out a solution for the same thing. And yes react-markdown does not attach ids to heading tags so you can't link to them without plugins or writing helper functions. I tried various solutions but what helped me the most was rehype-slug

@abbeyperini
Copy link
Owner Author

As stated in the description , I decided against rehype plugins.

Moving blogs per #16, so this will not be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants