diff --git a/README.rst b/README.rst index 2a26077..b5b233e 100644 --- a/README.rst +++ b/README.rst @@ -238,33 +238,30 @@ Let's create a section for some example codes. We will use ``sphinx_gallery`` ex 3. Add the sphinx_gallery config to **conf.py**: -.. code-block:: python - - sphinx_gallery_conf = { - # path to your example scripts - 'examples_dirs': ['../examples'], - # path to where to save gallery generated output - 'gallery_dirs': ['auto_examples'], - 'filename_pattern': '.py', - 'plot_gallery': 'False', - } - + .. code-block:: python + + sphinx_gallery_conf = { + # path to your example scripts + 'examples_dirs': ['../examples'], + # path to where to save gallery generated output + 'gallery_dirs': ['auto_examples'], + 'filename_pattern': '.py', + 'plot_gallery': 'False', + } 4. In the ``examples`` folder, create a **README.rst** or **README.txt** file. -A readme file is necessary for sphinx_gallery to generate documentation. Copy/paste this text: - -.. code-block:: rst - - Calculator Examples - ################### - - This folder contains example code for the **calculator.py** module. + A readme file is necessary for sphinx_gallery to generate documentation. Copy/paste this text: + .. code-block:: rst + Calculator Examples + ################### + This folder contains example code for the **calculator.py** module. 5. From ``docs``, run ``make html``. There is a new folder called ``auto_examples`` created in ``docs``, with all the generated -documentation for modules in the ``examples`` folder. + documentation for modules in the ``examples`` folder. + 6. In ``docs/index.rst``, add the new automatically created index file: