-
Notifications
You must be signed in to change notification settings - Fork 319
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
fix version-switcher with dirhtml builder #1795
fix version-switcher with dirhtml builder #1795
Conversation
c65fdb4
to
c31b7e1
Compare
I was having the same issue and this PR does fix it for me. Thanks @casperdcl! |
c31b7e1
to
f614def
Compare
var getCurrentUrlPath = () => { | ||
if (DOCUMENTATION_OPTIONS.BUILDER == "dirhtml") { | ||
return DOCUMENTATION_OPTIONS.pagename == "index" | ||
? `/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw I'm unsure if this would suffice (avoids duplicate //
suffix, but maybe breaks in some unknown edge cases? I haven't tested it thoroughly)
? `/` | |
? "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
Ok, let's try that. It seem simple enough that I believe it is safe to merge. |
Problem: version-switcher suffixes .html even if sphinx was used with the dirhtml builder. Solution: suffix / instead where necessary. --------- Co-authored-by: Daniel McCloy <[email protected]>
Problem: version-switcher suffixes
.html
even if sphinx was used with thedirhtml
builder.Solution: suffix
/
instead where necessary.