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

Fix use of html_file_suffix instead of html_link_suffix in search results #7278

Merged
merged 1 commit into from
Mar 8, 2020

Conversation

rdb
Copy link
Contributor

@rdb rdb commented Mar 7, 2020

The links in the search results have html_file_suffix appended instead of html_link_suffix. This fixes that.

To reproduce the bug, build any documentation with html_file_suffix set to ".html" and html_link_suffix set to "". The regular links between pages will be extensionless, but the search results will have .html at the end.

@codecov
Copy link

codecov bot commented Mar 7, 2020

Codecov Report

Merging #7278 into 3.x will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a73617c...a717ffe. Read the comment docs.

rdb added a commit to panda3d/panda3d-docs that referenced this pull request Mar 7, 2020
@blueyed
Copy link
Contributor

blueyed commented Mar 7, 2020

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.. :)

@tk0miya tk0miya added this to the 3.0.0 milestone Mar 8, 2020
@tk0miya tk0miya changed the base branch from 2.x to 3.x March 8, 2020 03:09
@tk0miya tk0miya changed the base branch from 3.x to 2.4.x March 8, 2020 03:10
@tk0miya tk0miya changed the base branch from 2.4.x to 3.x March 8, 2020 03:10
Copy link
Member

@tk0miya tk0miya left a 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.

@tk0miya
Copy link
Member

tk0miya commented Mar 8, 2020

BTW, I don't still understand how useful html_link_suffix is. Could you let me know what purpose you've used if possible.

@rdb
Copy link
Contributor Author

rdb commented Mar 8, 2020

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:
https://docs.panda3d.org/1.10/python/index

@tk0miya
Copy link
Member

tk0miya commented Mar 8, 2020

Thank you for update and explanation. I understand.

@tk0miya tk0miya merged commit fdd8955 into sphinx-doc:3.x Mar 8, 2020
tk0miya added a commit that referenced this pull request Mar 8, 2020
@tk0miya
Copy link
Member

tk0miya commented Mar 8, 2020

Merged. Thank you for your contribution!

blueyed added a commit to blueyed/pytest that referenced this pull request Mar 9, 2020
rdb added a commit to panda3d/panda3d-docs that referenced this pull request Jul 29, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants