Python でパッケージを文書化しようとしています。現時点では、次のディレクトリ構造があります。
.
└── project
├── _build
│ ├── doctrees
│ └── html
│ ├── _sources
│ └── _static
├── conf.py
├── index.rst
├── __init__.py
├── make.bat
├── Makefile
├── mod1
│ ├── foo.py
│ └── __init__.py
├── mod2
│ ├── bar.py
│ └── __init__.py
├── _static
└── _templates
このツリーは の起動の結果ですsphinx-quickstart
。私はconf.py
コメントを外しsys.path.insert(0, os.path.abspath('.'))
、私は持っていextensions = ['sphinx.ext.autodoc']
ます。
私index.rst
は:
.. FooBar documentation master file, created by
sphinx-quickstart on Thu Aug 28 14:22:57 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to FooBar's documentation!
==================================
Contents:
.. toctree::
:maxdepth: 2
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
すべての__init__.py
's には docstring があり、同じことがモジュールfoo.py
およびbar.py
. ただし、make html
プロジェクトで実行すると、ドキュメントが表示されません。