$ sphinx-quickstart "docs"
> Separate source and build directories (y/n) [n]: n
> Name prefix for templates and static dir [_]: _
> Project name: iControl
> Author name(s): Digitalblend
> Source file suffix [.rst]: .rst
> Name of your master document (without suffix) [index]: index
> Do you want to use the epub builder (y/n) [n]: n
> autodoc: automatically insert docstrings from modules (y/n) [n]: y
> doctest: automatically test code snippets in doctest blocks (y/n) [n]: n
> intersphinx: link between Sphinx documentation of different projects (y/n) [n]: n
> todo: write “todo” entries that can be shown or hidden on build (y/n) [n]: n
> coverage: checks for documentation coverage (y/n) [n]: y
> pngmath: include math, rendered as PNG images (y/n) [n]: n
> mathjax: include math, rendered in the browser by MathJax (y/n) [n]: n
> ifconfig: conditional inclusion of content based on config values (y/n) [n]: n
> viewcode: include links to the source code of documented Python objects (y/n) [n]: n
> Create Makefile? (y/n) [y]: y
> Create Windows command file? (y/n) [y]: n
Edit sphinx configuration file.
Add to docs/conf.py
:
import os, sys, django
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, '../.env/bin')
sys.path.insert(0, '../.env/lib/python3.4/site-packages/django')
sys.path.insert(0, '../.env/lib/python3.4/site-packages')
os.environ['DJANGO_SETTINGS_MODULE'] = 'Application.settings'
django.setup()
Create docs/project.rst
:
Project
=======
.. automodule:: Path.To.Project
:members:
Add to docs/index.rst
:
.. toctree::
:maxdepth: 2
:caption: title
project
$ cd docs && make html
Docs are in docs/_build/html folder