-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added 2 new options: rtd_sphinx_search_default_filter and rtd_sphinx_search_filters. - The options are passed as a JSON object to be read by our JS code. - The default filter defaults to the current project and version (extracted from the RTD env vars) - Filters are implemented as check boxes, we only support one filter at a time (when a filter is selected, we uncheck all others) How to test locally: - Run your local version of RTD - To allow cross site requests, add `|/api/v3/search` at https://github.com/readthedocs/readthedocs.org/blob/b574f4b0dad34ccba8595cee72246d3473f8a2e5/readthedocs/settings/base.py#L769-L781 - Change the `rtd_dummy_data.json` file - `'proxied_api_host': 'http://devthedocs.org'` - Set the project and version to a project that you have locally - Change the value of `rtd_sphinx_search_default_filter = "project:superproject/latest"` to the slug of a project you have locally - Build the docs: ``` cd docs make clean html ``` - Open the _build/index.html file. ### showcase [showcase.webm](https://user-images.githubusercontent.com/4975310/225148123-7811d477-3a91-4eea-b9fb-b8cb1cbf0d6a.webm) Closes #129 Closes #130 Closes #131
- Loading branch information
Showing
14 changed files
with
282 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{# Set the extension options as a JSON object, so it can be used from our JS code. #} | ||
var RTD_SEARCH_CONFIG = {{ rtd_search_config | tojson }}; |
Oops, something went wrong.