Blob Blame History Raw
From 6f089d9a4d05e031ea443f7543c8f9b1c62e9135 Mon Sep 17 00:00:00 2001
From: Antony Lee <anntzer.lee@gmail.com>
Date: Sat, 28 Mar 2020 12:47:18 +0100
Subject: [PATCH] Remove notebook links from docs.

---
 .doc-requirements.txt                             | 6 +++---
 doc/source/_static/hide_some_gallery_elements.css | 3 +++
 doc/source/conf.py                                | 8 +++++---
 3 files changed, 11 insertions(+), 6 deletions(-)
 create mode 100644 doc/source/_static/hide_some_gallery_elements.css

diff --git a/.doc-requirements.txt b/.doc-requirements.txt
index eee57d6..acbfbe5 100644
--- a/.doc-requirements.txt
+++ b/.doc-requirements.txt
@@ -1,3 +1,3 @@
-pandas==0.24.1
-sphinx==1.5.6
-sphinx-gallery==0.1.13
+pandas==1.0.0
+sphinx==2.4.4
+sphinx-gallery==0.6.0
diff --git a/doc/source/_static/hide_some_gallery_elements.css b/doc/source/_static/hide_some_gallery_elements.css
new file mode 100644
index 0000000..b2a0738
--- /dev/null
+++ b/doc/source/_static/hide_some_gallery_elements.css
@@ -0,0 +1,3 @@
+div.sphx-glr-download-link-note, div.sphx-glr-download-jupyter {
+  display: none;
+}
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 47368d1..461e1a3 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -14,7 +14,7 @@
     'sphinx.ext.viewcode',
     'sphinx_gallery.gen_gallery',
 ]
-needs_extensions = {'sphinx_gallery.gen_gallery': '0.1.13'}
+needs_extensions = {'sphinx_gallery.gen_gallery': '0.6.0'}
 
 source_suffix = '.rst'
 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
@@ -38,7 +38,6 @@
 # -- Options for HTML output ----------------------------------------------
 
 html_theme = 'alabaster'
-html_sidebars = {'**': ['about.html', 'navigation.html', 'localtoc.html']}
 html_theme_options = {
     'description': 'Interactive data selection cursors for Matplotlib.',
     'github_user': 'anntzer',
@@ -47,6 +46,9 @@
     'github_button': False,
     'code_font_size': '80%',
 }
+html_css_files = ['hide_some_gallery_elements.css']
+html_static_path = ['_static']
+html_sidebars = {'**': ['about.html', 'navigation.html', 'localtoc.html']}
 # html_last_updated_fmt = ''  # bitprophet/alabaster#93
 
 htmlhelp_basename = 'mplcursors_doc'
@@ -102,7 +104,7 @@
 os.environ.pop("DISPLAY", None)  # Don't warn about non-GUI when running s-g.
 
 sphinx_gallery_conf = {
-    'backreferences_dir': False,
+    'backreferences_dir': None,
     'examples_dirs': '../../examples',
     'filename_pattern': r'.*\.py',
     'gallery_dirs': 'examples',