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
#1618 make search results reader friendly #4022
#1618 make search results reader friendly #4022
Conversation
request results as HTML instead of source files retrieve preview snippet text from HTML
|
@tk0miya does this PR make sense to you? |
|
Poke |
|
@tk0miya could you provide feedback? Is this something that might get merged eventually? |
Codecov Report
@@ Coverage Diff @@
## master #4022 +/- ##
=========================================
- Coverage 82.1% 82.1% -0.01%
=========================================
Files 297 303 +6
Lines 39827 40165 +338
Branches 6152 6206 +54
=========================================
+ Hits 32701 32976 +275
- Misses 5764 5820 +56
- Partials 1362 1369 +7
Continue to review full report at Codecov.
|
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.
Sorry for very very very late reviewing.
LGTM with nits!
| suffix = '.txt'; | ||
| } | ||
| $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix), | ||
| $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + '.html', |
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.
We have to give a name of extension as a template variable. Sometimes it might be changed by html_file_suffix.
http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_file_suffix
|
In addition, the warning of |
Setting `html_copy_source` no longer affects search results
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!
|
@tk0miya Can this be merged? (Just to be sure) |
|
Yes, of course :-) |
…results-reader-friendly
|
Great. I added the change info on this branch and suppose I need to control-merge again eventually to make the build pass. |
|
Coud you merge HEAD of master again please? |
This seems to have been a mistake with sphinx-doc#4022 the ajax call functions correctly without the source files being included in the build (they are never used). I have tested this out on several themes and now everything works correctly with `html_copy_source = False`
This seems to have been a mistake with sphinx-doc#4022 the ajax call functions correctly without the source files being included in the build (they are never used). I have tested this out on several themes and now everything works correctly with `html_copy_source = False`
This seems to have been a mistake with #4022 the ajax call functions correctly without the source files being included in the build (they are never used). I have tested this out on several themes and now everything works correctly with `html_copy_source = False`
Subject: Make search results reader friendly
Fixes #1618
Feature or Bugfix
Purpose
See my comment on the related issue.
There's one fairly simply way to improve the readability of the search results without adding additional build steps or output files. Currently, the search displays results snippets by requesting the corresponding source files from the server/local file system and extracting the text from them. It's possible to adjust this functionality so that it requests the HTML files instead of the source files.
Detail
True.Relates