相关疑难解决方法(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万
查看次数

修改Sphinx主题"阅读文档"的内容宽度

我正在使用"阅读文档"Sphinx主题作为我的文档.在原始主题中,给出如下

http://read-the-docs.readthedocs.org/en/latest/theme.html

内容或主要布局宽度设计为移动友好.但是,对于我的项目,我希望这会更广泛.我不知道HTML,因此如果任何人可以给我一些线索来增加内容(布局)宽度,我将不胜感激.

html themes width python-sphinx

32
推荐指数
8
解决办法
2万
查看次数

Sphinx 中普通文本的换行符

我的 .rst 文件中有以下文本:

Some text.
* Heading
  | The first topic.
  | Another topic which is very verbose and spans multiple lines ad infinitum.
  Topic continued......................................
Run Code Online (Sandbox Code Playgroud)

我希望它呈现为:

Some text.
* Heading
  The first topic.
  Another topic which is very verbose and spans multiple lines ad infinitum....................
  Topic continued.............
Run Code Online (Sandbox Code Playgroud)

然而,它在 Html 中呈现如下:

Some text.
* Heading| The first topic.| Another topic which is very verbose and spans multiple lines ad infinitum .................... Topic continued
Run Code Online (Sandbox Code Playgroud)

Sphinx 文档建议使用该|符号来表示换行符,就像 Stackoverflow 上的几篇文章一样,但我一直无法让它工作。我想要一种独立于所使用的 Sphinx …

python-sphinx

5
推荐指数
1
解决办法
7251
查看次数

标签 统计

python-sphinx ×3

html ×1

python ×1

themes ×1

width ×1