Releases: sphinx-contrib/sphinx-pretty-searchresults
Support `dirhtml` builder
#25: Adds support for dirhtml
builder
Support multiple source suffixes
Fixes #23 Sphinx: pretty search results didn't support multiple source suffixes, which was especially problematic for users who combine reStructuredText and Markdown files in their projects.
Support transition removal
Fixes #21 Sphinx: pretty search results didn't remove transitions.
Support custom template path
Fixes #17: If a templates_path
is set, Sphinx: pretty search results threw a Recursion error
, because it expected a overridable sourcelink.html
template at a specific index of app.builder.templates.loaders
. Now, the extension searches in all loaders for sourcelink.html
and doesn't attempt to override sourcelink.html
if it can't find this template.
Fix rebuild issue
Fixes #14: When rebuilding a Sphinx project without cleaning/removing the build files, the build can fail, because the extension expects that the _raw_sources
directory doesn't exists.
Support source links
Previously, the extension would overwrite the source files Sphinx copies to the build result. This is a problem for projects that have the property html_show_sourcelink activated. This commit fixes the issue by introducing a second directory for "raw" source files. For more details, consider the README.
Support new source names
Since version 1.5.0, Sphinx is adding the source file extension to the source files it includes in the output folder.
For example, when your source file extension is rst
(specified in the config variable source_suffix
as [.rst]
, your index file appears in the output's source folder as index.rst.txt
.
If you use a Sphinx version lower than 1.5.0, it appears as index.txt
.
Here's the link to the PR that introduces the breaking change: sphinx-doc/sphinx#2454.
The solution adjust the file name/suffix based on the Sphinx version:
- If you use Sphinx >=1.5, the file name will be filename + source_file_ending + ".txt".
- If you use Sphinx < 1.5, the file name will be filename + ".txt".
The changes also add aconfig option that allows forcing a fallback to 2).
This will help folks who use this extension for a long time and whose templates evolved accordingly.