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

Side nav anchor links not working #113

Closed
vardhi opened this issue Dec 21, 2022 · 4 comments
Closed

Side nav anchor links not working #113

vardhi opened this issue Dec 21, 2022 · 4 comments

Comments

@vardhi
Copy link

vardhi commented Dec 21, 2022

After generating docs using docdash-2.0.0, method names that appear in the side nav links to incorrect anchor.

currently generated anchors: /docs/foo_class.html#.bar_method#bar_method
expected correct link: /docs/foo_class.html#bar_method

After debugging a bit found out that, this commit (6306090) was causing the issue.

@0x1026
Copy link

0x1026 commented Dec 26, 2022

Yeah, I've the same problem

@ookjosh
Copy link

ookjosh commented Jan 3, 2023

Same issue using 2.0.0.

Commenting/removing the following lines from publish.js (per @vardhi link to 6306090) fixed the issue for me, at least in my minimal testing. Not sure if there are edge cases to be considered, but it appears linkto is working correctly (per the authors comment)?

// publish.js ~ line 388
// Remove the following block:

// Not certain if there is a situation where this is needed anymore
// linkto method seems to solve this problem already, but at least this check
// will prevent duplicate #'s in links.
if (!navItemLink.includes("#." + method.name)) {
   var strNewLink = '.html#.' + method.name;

   navItemLink = navItemLink.replace(".html", strNewLink);
}

@demmings
Copy link

demmings commented Jan 8, 2023

Hey @ookjosh,

I setup docdash and was about to throw it away since the links were hit and miss. I tried your change and it is much improved. Will keep using. Thanks.

@ar2rsawseen
Copy link
Collaborator

Hello,
Sorry, I was on Christmas vacation for a couple of last weeks.
Fixed and published 2.0.1
Thank you for reporting

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

5 participants