Sphinx 内容搜索结果

Sphinx contents search results

我目前正在使用 sphinxdoc 版本 1.4.6 的阅读文档主题。当我搜索内容时,查询显示重组文本文件的标题和开始,而不是 html 页面的标题和开始。有什么办法可以改变它吗?

试试 sphinx 扩展“sphinxprettysearchresults”(https://pypi.python.org/pypi/sphinxprettysearchresults)。

他们的网站是这样说的:

To display search results, Sphinx is fetching the source files of search hits and rendering excerpts in raw markup (Example).

This extension removes the markup from these source files (during build time), so the search results look decent.

但是,当我将它加载到我的项目中时,出现错误,我必须报告该错误。

也许它在你的项目中工作得很好。