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

feat(ui): Add anchor link to headings #261

Merged
merged 3 commits into from
May 9, 2023
Merged

feat(ui): Add anchor link to headings #261

merged 3 commits into from
May 9, 2023

Conversation

samridht23
Copy link
Contributor

added fragment identifier to titles so we can directly link the part of the docs and do not have to scroll the to find a particular heading

Copy link
Collaborator

@half0wl half0wl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

This throws an error for me locally:

Error: Hydration failed because the initial UI does not match what was rendered on the server.
See more info here: https://nextjs.org/docs/messages/react-hydration-error

Do you happen to know why?

It also looks like anchors are getting nested:

ss 2023-05-04 at 12 53 19 AM

@samridht23
Copy link
Contributor Author

samridht23 commented May 5, 2023

I have addressed the hydration issue and removed the nested <a> tag in this pull request. That was caused by improper handling of server-side rendering and hydration of the component. Can you check if the issue still persist.

@samridht23 samridht23 requested a review from half0wl May 7, 2023 07:21
Copy link
Collaborator

@half0wl half0wl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works, thank you!

@half0wl half0wl changed the title fragment identifier added feat(ui): Add anchor link to headings May 9, 2023
@half0wl
Copy link
Collaborator

half0wl commented May 9, 2023

Resolves #246

@half0wl half0wl merged commit 313a721 into railwayapp:main May 9, 2023
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.

2 participants