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

Incorrect section link behavior #3110

Closed
teikjun opened this issue Jul 23, 2020 · 1 comment · Fixed by #3112
Closed

Incorrect section link behavior #3110

teikjun opened this issue Jul 23, 2020 · 1 comment · Fixed by #3112
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@teikjun
Copy link
Contributor

teikjun commented Jul 23, 2020

🐛 Bug Report

The section links go to an incorrect route when targeting a section on the same page. The relative link is appended to the baseUrl instead of the current url.
For example: On https://v2.docusaurus.io/docs/configuration, [site-metadata](#site-metadata) links to
https://v2.docusaurus.io/#site-metadata instead of https://v2.docusaurus.io/docs/configuration#site-metadata

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Go to https://v2.docusaurus.io/docs/configuration

  2. Click a section link e.g Site metadata (or any of the following links)
    image

  3. The link directs to https://v2.docusaurus.io/#site-metadata, which is incorrect.

Expected behavior

The link directs to https://v2.docusaurus.io/docs/configuration#site-metadata.

Actual Behavior

The link directs to https://v2.docusaurus.io/#site-metadata.

Your Environment

  • Docusaurus version used: -
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Firefox
  • Operating system and version (desktop or mobile): Windows

Reproducible Demo

https://v2.docusaurus.io/docs/configuration

Remarks

I think this issue might be a side-effect of the changes made in #3093

@teikjun teikjun added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Jul 23, 2020
@slorber
Copy link
Collaborator

slorber commented Jul 23, 2020 via email

@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants