【问题标题】:Add sidebar to all pages except index in sphinx-bootstrap-theme将侧边栏添加到除 sphinx-bootstrap-theme 中的索引之外的所有页面
【发布时间】:2017-03-12 10:32:57
【问题描述】:

我通过将以下内容附加到 conf.py 为我的 sphinx 文档添加了一个侧边栏

html_sidebars = {'**': ['my_custom_sidebar.html']}

这会导致侧边栏显示在所有页面上。 我希望这个侧边栏显示在除索引页面之外的所有页面上。我该怎么做呢?

【问题讨论】:

    标签: python-sphinx restructuredtext


    【解决方案1】:

    检查这个答案:Sphinx exclude one Page from html_sidebars

    我使用 Chris Bay 的代码让它工作:

    html_sidebars = {
    '**': ['localtoc.html'],
    'index': []
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-14
      • 1970-01-01
      • 2020-10-22
      • 2021-08-31
      • 1970-01-01
      • 1970-01-01
      • 2014-10-04
      相关资源
      最近更新 更多