-
Notifications
You must be signed in to change notification settings - Fork 115
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
[Bug]: Anchor is removed after redirection #154
Comments
I'll fix this |
I didn't find a good way to fix this and I looked into the community it seems to be a common issue. The reason is the anchor in Chinese and english are not the same and it happens to be the same in this case(both #htmldisablehtmlfolder). Vue website have the same issue. If we simply add the anchor to the link, would it be confusing that the anchor only works sometime? @chenjiahan @sanyuan0704 What's your opinion on this? |
Sometimes it's just a useless anchor, it's fine because it does not break anything.. |
But I believe some of the community would prefer a clean url 😄 |
That's true 😂 |
I think the anchor can be reserved to make the experience in some cases better. The hash is computed from markdown/mdx title so we cannot ensure the hash is consistent between different languages. But from the perspective of framework, we can keep the same experience as much as possible, although not 100% accurate. |
Version
Details
When an English user visits https://modernjs.dev/builder/api/config-html.html#htmldisablehtmlfolder, the URL will be redirected to https://modernjs.dev/builder/en/api/config-html.html, and the hash anchor is removed.
The hash anchor may be the same between the English and Chinese documentation, so it is better to keep the hash anchor.
Reproduce link
https://modernjs.dev/builder/api/config-html.html#htmldisablehtmlfolder
Reproduce Steps
See above.
The text was updated successfully, but these errors were encountered: