Skip to content

fix: relative URL resolution for client-side docs navigation#1646

Open
GunniBusch wants to merge 1 commit intolsegal:mainfrom
GunniBusch:fix-template-relative-url
Open

fix: relative URL resolution for client-side docs navigation#1646
GunniBusch wants to merge 1 commit intolsegal:mainfrom
GunniBusch:fix-template-relative-url

Conversation

@GunniBusch
Copy link

@GunniBusch GunniBusch commented Feb 25, 2026

Summary

Sidebar navigation links are generated as relative URLs that work from the docs root, but they break when the current page is under a nested path.

This change uses the existing relpath value

relpath = '<%= u = url_for(''); u + (u != '' ? '/' : '') %>';
to build a resolved URL (rel_url = relpath + e.data.url) and then uses that resolved URL consistently during navigation.

Please see the homebrew ruby docs as an example: https://docs.brew.sh/rubydoc/Formula/FormulaConflict.html. From this class try going to any other class. Also see Homebrew/brew#21589

@GunniBusch GunniBusch changed the title Fix relative URL resolution for client-side docs navigation fix: relative URL resolution for client-side docs navigation Feb 25, 2026
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.

1 participant