gpt4 book ai didi

python - 在 Sphinx 上实现自定义主题

转载 作者:太空宇宙 更新时间:2023-11-04 06:43:57 25 4
gpt4 key购买 nike

我正在尝试在本地为 sphinx 实现我自己的自定义主题。我一直遇到这个错误:未找到名为“custom_theme”的主题(缺少 theme.conf?)。我的 custom_theme/ 目录中有一个 theme.conf。看起来像:

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

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

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

作为引用,我一直在尝试在这个主题的 repo https://github.com/snide/sphinx_rtd_theme 上镜像设置.使用 grunt 来构建我的样式等。但仍然出现该错误。我希望有人找到了一些关于如何创建自己的 sphinx 主题和模板的详细文档。谢谢。

最佳答案

我相信你想把主题放在/usr/share/sphinx/themes 中。

关于python - 在 Sphinx 上实现自定义主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29833751/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com