|
29 | 29 | extensions = ['matplotlib.sphinxext.mathmpl', 'sphinxext.math_symbol_table', |
30 | 30 | 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives', |
31 | 31 | 'sphinx.ext.doctest', 'sphinx.ext.autosummary', |
32 | | - 'matplotlib.sphinxext.plot_directive', |
33 | 32 | 'sphinx.ext.inheritance_diagram', |
34 | | - 'sphinxext.gen_gallery', 'sphinxext.gen_rst', |
| 33 | + 'sphinx_gallery.gen_gallery', |
| 34 | + 'sphinxext.gen_rst', |
| 35 | + 'matplotlib.sphinxext.plot_directive', |
35 | 36 | 'sphinxext.github', |
36 | 37 | 'numpydoc'] |
37 | 38 |
|
|
53 | 54 | raise ImportError("No module named numpydoc - you need to install " |
54 | 55 | "numpydoc to build the documentation.") |
55 | 56 |
|
| 57 | +try: |
| 58 | + import sphinx_gallery |
| 59 | +except ImportError: |
| 60 | + raise ImportError("No module named sphinx_gallery - you need to install " |
| 61 | + "sphinx_gallery to build the documentation.") |
| 62 | + |
56 | 63 | try: |
57 | 64 | import colorspacious |
58 | 65 | except ImportError: |
|
96 | 103 |
|
97 | 104 | autodoc_docstring_signature = True |
98 | 105 |
|
| 106 | + |
| 107 | +# Sphinx gallery configuration |
| 108 | +sphinx_gallery_conf = { |
| 109 | + # path to your examples scripts |
| 110 | + 'examples_dirs' : '../examples', |
| 111 | + # path where to save gallery generated examples |
| 112 | + 'gallery_dirs' : 'auto_examples'} |
| 113 | + |
| 114 | +plot_gallery = True |
| 115 | + |
99 | 116 | # Add any paths that contain templates here, relative to this directory. |
100 | 117 | templates_path = ['_templates'] |
101 | 118 |
|
|
234 | 251 | # Additional templates that should be rendered to pages, maps page names to |
235 | 252 | # template names. |
236 | 253 | html_additional_pages = {'index': 'index.html', |
237 | | - 'gallery':'gallery.html', |
238 | 254 | 'citing': 'citing.html'} |
239 | 255 |
|
240 | 256 | # If false, no module index is generated. |
|
0 commit comments