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

docs: make links jump to beginning of the section #1835

Closed
wants to merge 2 commits into from

Conversation

simlmx
Copy link
Contributor

@simlmx simlmx commented Feb 13, 2022

Why

Currently going through the documentation is very annoying since it always bring you back to the big header. Many people have voiced that issue in #1799

What

Here I change the links in the table of content to point to the section (they all have a url pointing to them).
Note that I only "fixed" the links in the table of content, not the inline links of the doc.

Checklist

  • Documentation updated
  • Demo added
  • Ready to be merged

I'm not sure this is the proper approach but it was very straightforward to add.

@vercel
Copy link

vercel bot commented Feb 13, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/react-spring-io/Em8KVNfqKQuwmKvEotZ1atxLtJEX
✅ Preview: https://react-spring-io-git-fork-simlmx-links-jump-to-section-pmndrs.vercel.app

@orta
Copy link
Contributor

orta commented Mar 30, 2022

I was just cloning the repo to make this PR, this should get merged - reading docs by having to scroll through a page of headers each time gets annoying pretty quickly

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 89588a3:

Sandbox Source
spring-animating-auto Configuration
spring-card Configuration
spring-cards-stack Configuration
pmndrs/react-spring Configuration
pmndrs/react-spring Configuration
spring-exit-before-enter Configuration
pmndrs/react-spring Configuration
pmndrs/react-spring Configuration
pmndrs/react-spring Configuration

@joshuaellis
Copy link
Member

Looking at the deployment this doesn't work as intended, i think this is because the rehype/remark plug in doesn't use hyphens so use-chain should actually be usechain.

@orta
Copy link
Contributor

orta commented Mar 30, 2022

No worries, I'll send a new PR with fixed links 👍🏻

@joshuaellis
Copy link
Member

closing in favour of #1867

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.

3 participants