I discovered a hacky workaround for this:

In searchtools.js, find the following:

listItem.append($('<a/>').attr('href', 
            item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX + 
            highlightstring + item[2]).html(item[1])); 

Use a javascript string replace on item[0] to replace .rst with nothing:

listItem.append($('<a/>').attr('href',
            item[0]*.replace('.rst', '')* + 
DOCUMENTATION_OPTIONS.FILE_SUFFIX +
            highlightstring + item[2]).html(item[1])); 



On Tuesday, May 1, 2018 at 5:33:30 PM UTC-4, Michael Landry wrote:
>
> Search result links have been broken in our docs since we upgraded from 
> Sphinx 1.3 to Sphinx 1.7.
>
> Whenever you click a search result link, the resulting URL includes an 
> extra ".rst" which shouldn't be there, and is breaking the link.
>
> For example: overview*.rst*.html?highlight=token should be 
> overview.html?highlight=token
>
> You can see for yourself here: 
> https://apidocs.apperian.com/production/search.html?q=token&check_keywords=yes&area=default
>
> I've done a bunch of googling, and have found similar issues, but I 
> haven't been able to find a good resolution. Many of the issues I've found 
> have to do with the ReadTheDocs theme, but we're using the Classic theme.
>
> I've tried changing the value of html_file_suffix to ".html"
>
> Our users have not been able to search since March. Has anyone else 
> encountered/fixed this issue?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To post to this group, send email to sphinx-users@googlegroups.com.
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to