在Sphinx上实现自定义主题

时间:2015-04-23 20:32:14

标签: python documentation python-sphinx

我正在尝试在本地为sphinx实现我自己的自定义主题。我一直遇到这个错误: no theme named 'custom_theme' found (missing theme.conf?)。 我的theme.conf目录中有一个custom_theme/。看起来像:

[theme]
inherit = basic
stylesheet = styles/site.min.css

在我的conf.py中,我有以下相关设置:

html_theme = 'custom_theme'
html_theme_path = ["."]

作为参考,我一直在努力反映这个主题的回复https://github.com/snide/sphinx_rtd_theme。使用grunt来构建我的样式等。但仍然得到那个错误。我希望有人找到一些关于如何创建自己的狮身人面像主题和模板的详细文档。谢谢。

2 个答案:

答案 0 :(得分:0)

我相信你想放弃/ usr / share / sphinx / themes中的主题。

答案 1 :(得分:-2)

我最终只是覆盖所有内容并将我的主题放在source/