用户界面调整¶
以下是您可能要考虑更改用户界面(UI)外观的一些小更改:
主题¶
sphinx使用主题来控制文档导出为最终格式时的外观。
我更喜欢阅读文档主题,而不是Sphinx安装配置的雪花石膏主题,所以我在docs/source/conf.py中更新它。
原始行:
html_theme = 'alabaster'
更改为:
html_theme = 'default'
其他斯芬克斯内置主题包括:
经典
斯芬克斯DOC
卷轴
阿盖奥
传统的
自然
俳句
提要栏¶
本地站点侧边栏有点有限,但是在读取文档时工作正常。如果您想为本地版本提供更好的侧边栏,请尝试此更新。编辑docs/source/conf.py文件。找到这段诗:
# Custom sidebar templates, maps document names to template names.
#
# html_sidebars = {}
替换此节的最后一行,使其显示:
# Custom sidebar templates, maps document names to template names.
#
html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'], }