question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hashlinks from inside docusaurus only work a second time

See original GitHub issue

🐛 Bug Report

Hashlinks only work a second time on big documents when linked from inside docusaurus

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Create a document with a lot of headers in it
  2. Create a document that hyperlinks somewhere around the bottom of the document
  3. Click the hyperlink

Expected behavior

Hashlink works as expected and puts you at the right header

Actual Behavior

Hashlink puts you half a page above the right header

(Write what happened. Add screenshots, if applicable.)

Your Environment

  • Docusaurus version used: 2.0.0-alpha.58
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): Chrome, production environment (hashlinks don’t work in dev) built with Node.js v12.18.2
  • Operating system and version (desktop or mobile): Windows 10 desktop

Reproducible Demo

(Paste the link to an example repo, including a siteConfig.js, and exact instructions to reproduce the issue.) https://github.com/Repulser/Rythm-documentation (should npm run build and serve that since hashlinks don’t work in dev, the big document here is /faq and is linked from /settings#blacklist)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
Repulsercommented, Dec 20, 2020

Hey! Any update on this issue?

3reactions
lex111commented, Nov 11, 2020

Yes, thanks, now I see what the issue is. Indeed, this is related to the loading of images, rather we need to somehow detect that resources was loaded, and only then scroll to the header.

Read more comments on GitHub >

github_iconTop Results From Across the Web

siteConfig.js - Docusaurus v1
Currently, this users array is used only by the index.js and users.js ... secondaryColor is the color seen in the second row of...
Read more >
Docs Multi-instance | Docusaurus
Use multiple docs plugin instances on a single Docusaurus site. ... This feature is only useful for versioned documentation.
Read more >
Markdown links - Docusaurus
There are two ways of adding a link to another page: through a URL ... Markdown file references only work when the source...
Read more >
Markdown Features - Docusaurus
Markdown is a syntax that enables you to write formatted content in a readable syntax. We use MDX as the parsing engine, which...
Read more >
Using Plugins - Docusaurus
However, plugins can have options specified by wrapping the name and an options object in a two-member tuple inside your config.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found