Python 在Sphinx中自定义导入的主题
我真的很喜欢它,但它没有我想要的响应性可折叠菜单。我试图在给出的答案之后添加这个,但是当我运行Python 在Sphinx中自定义导入的主题,python,themes,python-sphinx,Python,Themes,Python Sphinx,我真的很喜欢它,但它没有我想要的响应性可折叠菜单。我试图在给出的答案之后添加这个,但是当我运行makehtml时,我得到了 Theme error: no theme named 'better' found, inherited by 'theme' 我的theme/theme.conf文件具有: [theme] inherit = better stylesheet = style.css pygments_style= pygments.css 我已经做了一些自定义添加我自己的css文
makehtml
时,我得到了
Theme error:
no theme named 'better' found, inherited by 'theme'
我的theme/theme.conf文件具有:
[theme]
inherit = better
stylesheet = style.css
pygments_style= pygments.css
我已经做了一些自定义添加我自己的css文件,但要获得响应菜单,我需要添加到模板本身。是否可以在不编辑主题的内置模板的情况下以这种方式进行自定义
于2017年5月24日更新
我想我已经把范围缩小到css文件了。better主题使用css_t文件,因此当我使用better主题时,实际的better.css
文件就是从这个模板生成的。因此,我需要做的是找到一种方法来处理更好的.css\t文件,并将其包含在最终输出中
我的conf.py
文件包含:
html_theme = 'theme'
html_theme_options = {'cssfiles': ['_static/butterick.css']}
我的主题/static/style.css
文件:
import url("better.css");
import url("butterick.css");
那么如何让模板引擎处理该模板呢?试试:
[theme]
inherit = basic
大多数主题都是从基本主题扩展而来,我想这可以解决您的问题。您是否遵循了主题的主题?您是否在尝试修改主题之前构建了文档?对两者都是。当我开箱即用时,主题已正确安装并运行。我希望找到一个类似于参考问题中的解决方案。我已将主题导入conf.py文件。