找不到 Sphinx 内置主题
Sphinx builtin themes not found
在我的 conf.py 中它说我应该查看内置主题列表的文档。现在我的第一个 google 命中将我带到了 http://www.sphinx-doc.org/en/stable/theming.html#builtin-themes 。那里有一堆我的狮身人面像不知道的主题。例如 'classic'.
在conf.py
html_theme = 'classic'
在我的 shell 上,我这样做:sphinx-build -b html source build
writing output... [100%] index
Exception occurred:
File "~\appdata\local\programs\python\python35\lib\site-packages\sphinx\jinja2glue.py", line 200, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: about.html
狮身人面像版本:1.6.3.
我有同样的问题,因为我以前使用过雪花石膏主题。 conf.py
中有几行是 alabaster 和 break 其他主题所需要的。你需要把它们注释掉。
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
# html_sidebars = {
# '**': [
# 'about.html',
# 'navigation.html',
# 'relations.html', # needs 'show_related': True theme option to display
# 'searchbox.html',
# 'donate.html',
# ]
# }
将 alabaster 主题更改为另一个不使用 about.html 的主题后出现问题。 Laurent 说了解决方法。
在我的 conf.py 中它说我应该查看内置主题列表的文档。现在我的第一个 google 命中将我带到了 http://www.sphinx-doc.org/en/stable/theming.html#builtin-themes 。那里有一堆我的狮身人面像不知道的主题。例如 'classic'.
在conf.py
html_theme = 'classic'
在我的 shell 上,我这样做:sphinx-build -b html source build
writing output... [100%] index
Exception occurred:
File "~\appdata\local\programs\python\python35\lib\site-packages\sphinx\jinja2glue.py", line 200, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: about.html
狮身人面像版本:1.6.3.
我有同样的问题,因为我以前使用过雪花石膏主题。 conf.py
中有几行是 alabaster 和 break 其他主题所需要的。你需要把它们注释掉。
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
# html_sidebars = {
# '**': [
# 'about.html',
# 'navigation.html',
# 'relations.html', # needs 'show_related': True theme option to display
# 'searchbox.html',
# 'donate.html',
# ]
# }
将 alabaster 主题更改为另一个不使用 about.html 的主题后出现问题。 Laurent 说了解决方法。