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

Page heading links don't work if the heading is inside a details section #191

Open
ysims opened this issue Oct 9, 2021 · 1 comment
Open

Comments

@ysims
Copy link
Member

ysims commented Oct 9, 2021

Can see on this page https://nubook.nubots.net/system/tools/nupbr
Having headings in <details> sections seems strange anyway.
But the problem is that when clicking on any of the right sidebar links on that page between 'How it Works' and 'Segmentation', it doesn't work unless the details section has already been opened that the heading lives in.
I'd suggest either removing the heading in the sidebar if it's in details, or have it jump to the right section and open the details.

@JosephusPaye
Copy link
Member

I think I prefer the approach of not showing headings inside <details> in the sidebar. If the author decides they're just details, it's probably not worth the inclusion. The implementation would be a little tricky though. You'll have to walk the MDX AST at compile time for each heading, to see if it's not a descendant of a <details> tag. That said, it think it's the better option.

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

No branches or pull requests

2 participants