diff --git a/doc/source/conf.py b/doc/source/conf.py index 5e75e542ef..fe10fecc6c 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -54,6 +54,15 @@ 'gallery_dirs': 'source/auto_examples' } +try: + import gen_rst +except: + pass + +# only include examples if the BUILD_PYART_EXAMPLES env. variable is set +if 'BUILD_PYART_EXAMPLES' in os.environ: + extensions.append('gen_rst') + # Configuration options for plot_directive. See: # https://github.com/matplotlib/matplotlib/blob/f3ed922d935751e08494e5fb5311d3050a3b637b/lib/matplotlib/sphinxext/plot_directive.py#L81 plot_html_show_source_link = False