Hi Martin, Sphinx does not provide such a function.
By the way, Sphinx is using `_build/html/_sources` to display the text of the search results. Therefore, you will be able to provide the functionality you want in the following method: $ make html $ make text $ rm -R _build/html/_sources $ cp -R _build/text _build/html/_sources As side effect, the "Show Source" link in sidebar shows plain text too instead of reST source. I think it is a tricky way but effective for your expectation. Regards, -- Takayuki SHIMIZUKAWA http://about.me/shimizukawa 2013/4/10 <[email protected]>: > Hello everyone, > > we're using Sphinx 1.1.3 to generate our documentation. The documents are > english text, not an api reference. In the HTML output the Sphinx search > function displays short excerpts directly from the .rst source. This is not > optimal for us, as there is a lot of ReST markup in the excerpts. It also > means the end user gets to see comments like "extend this section with more > details in the future". > > Is there any way to instead use the plain text output format as a source for > the excerpts or maybe another way to "clean up" the the text used as a > preview for the search results? I found an older thread > (https://groups.google.com/d/topic/sphinx-users/LTXwbmX0CeE/discussion) that > suggests modifying Sphinx and the javascript code to do just that, but I'm > hoping for a built-in solution. The only alternative I could find is setting > html_copy_source to False and thus completely disable the previews. > > Thanks, > Martin > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sphinx-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sphinx-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
