相关疑难解决方法(0)

如何将自定义css文件添加到Sphinx?

我如何添加自定义css文件?以下配置对我不起作用:

# conf.py
html_static_path = ['_static']
html_theme = 'default'
html_theme_options = {
  'cssfiles': ['_static/style.css']
}
Run Code Online (Sandbox Code Playgroud)

结果:

C:\temp\test-docs\docs>make html
Running Sphinx v1.2.2
loading pickled environment... not yet created
building [html]: targets for 2 source files that are out of date
updating environment: 2 added, 0 changed, 0 removed
reading sources... [ 50%] help
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents...
Theme error:
unsupported theme option 'cssfiles' given
Run Code Online (Sandbox Code Playgroud)

python python-sphinx

34
推荐指数
4
解决办法
1万
查看次数

标签 统计

python ×1

python-sphinx ×1