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

Use github-slugger #575

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

tomtomjhj
Copy link

@tomtomjhj tomtomjhj commented May 6, 2023

Use github-slugger package for slugifying heading anchors. This makes the internal links compatible with github's markdown.

Fixes #191

* Use the version that doesn't add count to distinguish identical slugs,
  because I don't know where to initialize a slugger instance.
* Update next to 12, because github-slugger is a pure ESM, which is not
  supported by next < 11. See
  https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#im-having-problems-with-esm-and-nextjs
* Update react stuff, which is peer dependency of next.
* Remove next-routes, which doesn't seem to be used.
I have no idea what I'm doing, but it seems to work.
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

Successfully merging this pull request may close these issues.

Anchor links containing special characters not being stripped
1 participant