如何自定义 Sphinx RtD 主题默认搜索设置?
How do I customize Sphinx RtD Theme default search settings?
如何覆盖 Sphinx RTD 主题附带的默认搜索 html。我在 Sphinx 1.5 上,主题总是导入的而不是静态的。
请参阅 Sphinx 文档中的 Templating。
To customize the output of your documentation you can override all the templates (both the layout templates and the child templates) by adding files with the same name as the original filename into the template directory of the structure the Sphinx quickstart generated for you.
Sphinx will look for templates in the folders of templates_path first, and if it can’t find the template it’s looking for there, it falls back to the selected theme’s templates.
在您的情况下,将 RTD Sphinx 主题的 search.html
从您安装的包复制到您的模板目录,并根据您的喜好进行修改。然后将 conf.py
中 templates_path
的值设置到它的位置。
如何覆盖 Sphinx RTD 主题附带的默认搜索 html。我在 Sphinx 1.5 上,主题总是导入的而不是静态的。
请参阅 Sphinx 文档中的 Templating。
To customize the output of your documentation you can override all the templates (both the layout templates and the child templates) by adding files with the same name as the original filename into the template directory of the structure the Sphinx quickstart generated for you.
Sphinx will look for templates in the folders of templates_path first, and if it can’t find the template it’s looking for there, it falls back to the selected theme’s templates.
在您的情况下,将 RTD Sphinx 主题的 search.html
从您安装的包复制到您的模板目录,并根据您的喜好进行修改。然后将 conf.py
中 templates_path
的值设置到它的位置。