-
Notifications
You must be signed in to change notification settings - Fork 2k
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 use of html_file_suffix instead of html_link_suffix in search results #7278
Conversation
40f011a
to
887427c
Compare
Codecov Report
@@ Coverage Diff @@
## 3.x #7278 +/- ##
=======================================
Coverage 84.03% 84.03%
=======================================
Files 279 279
Lines 43232 43232
Branches 6300 6300
=======================================
Hits 36332 36332
Misses 5523 5523
Partials 1377 1377 Continue to review full report at Codecov.
|
I'm not familiar with Sphinx' tests yet, but think it would be great to have a test for this - in case you are more familiar with it already.. :) |
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.
LGTM. But it would be better to merge this into 3.x branch. So please resolve conflicts with 3.x branch. Then I'll merge this.
Note: Unfortunately, there are no good testcases for search JS. You can add a case to tests/js/doctools.js
, but it seems many works are needed to do that. So I'm okay with no testing.
BTW, I don't still understand how useful |
OK, I will do that. In my set-up, I want to upload .html files to my server, but I want the user to see clean URLs without the .html extension at the end. So I configured my web server to automatically add on the .html extension when asking for a URL without extension, and set html_link_suffix to the empty string. This generally works pretty well: |
887427c
to
a717ffe
Compare
Thank you for update and explanation. I understand. |
Merged. Thank you for your contribution! |
The links in the search results have
html_file_suffix
appended instead ofhtml_link_suffix
. This fixes that.To reproduce the bug, build any documentation with
html_file_suffix
set to ".html" andhtml_link_suffix
set to "". The regular links between pages will be extensionless, but the search results will have .html at the end.