index.rst
以下のように見えるデに問題はありません:
ただし、別のページに移動すると、私の場合はであり、以下にannotation-module.rst
示すように、サイドバーは と の両方index
を選択して表示annotation-module
します。
ただし、注釈モジュールページのみをアクティブにして、そのサブセクションを表示したいと考えています。
以下のように環境変数を探すことによってconf.py
のみ使用します。html_theme
READTHEDOCS
if not on_rtd: # only import and set the theme if we're building docs locally
try:
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except Exception:
pass
私のindex.rst
:
Welcome to exceptive's documentation!
=====================================
.. toctree::
:maxdepth: 2
:caption: Contents:
index
annotation-module
Here I have some introductory text.
またannotation-module.rst
、何も含まれていませんtoctree
。その下にセクションしかありません。
では、サイドバーの現在のドキュメント セクションのみを有効にするにはどうすればよいでしょうか?
これは、 Steve Piercyによって要求されたドキュメントのソース ディレクトリです。
環境
- パイソン3.5
- スフィンクス 1.7.6
- スフィンクス-rtd-テーマ 0.4.0