22 July 2016

first steps with sphinx

  1. install sphinx

     $ pip install sphinx
    
  2. setup documentation sources

     $ shpinx-quickstart
    
  3. difine document structure

    1. toctree directive initially is empty

    2. add intro and tutorial

    3. create intro.rst and tutorial.rst in source folder

       $ touch intro.rst tutorial.rst
      
  4. running the build

    1. use sphinx-build

       $ sphinx-build -b html sourcedir builddir
      
    2. use make with Makefile or make.bat

       $ make html
      

read the docs sphinx theme

  1. installation via package

    1. install

       $ pip install sphinx_rtd_theme
      
    2. config

       ```conf
       # edit `conf.py` file
      
       import sphinx_rtd_theme
       html_theme = "sphinx_rtd_theme"
       html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
       ```
      

reference

  1. www.sphinx-doc.org

  2. first steps with sphinx

  3. sphinx_rtd_theme

  4. networkx documentation

  5. readthedocs.org



blog comments powered by Disqus