From 66ca909e665c422cd27b896219f98dc8b7ca242f Mon Sep 17 00:00:00 2001 From: Thib Guicherd-Callin Date: Fri, 26 Mar 2021 12:38:40 -0700 Subject: [PATCH] Hide "On Read The Docs" and "On GitHub" sections of the versions tab --- docs/_static/css/lockss.css | 7 +++++++ docs/conf.py | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 docs/_static/css/lockss.css diff --git a/docs/_static/css/lockss.css b/docs/_static/css/lockss.css new file mode 100644 index 0000000..b2c6be4 --- /dev/null +++ b/docs/_static/css/lockss.css @@ -0,0 +1,7 @@ +/* See https://docs.readthedocs.io/en/stable/guides/remove-edit-buttons.html#remove-on-section-from-versions-menu */ +div.rst-versions > div.rst-other-versions > div.injected > dl:nth-child(3) { + display: none; +} +div.rst-versions > div.rst-other-versions > div.injected > dl:nth-child(4) { + display: none; +} diff --git a/docs/conf.py b/docs/conf.py index d98cd9e..9b23b84 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -64,6 +64,11 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +# See https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html +html_css_files = [ + 'css/lockss.css', +] + # See https://github.com/readthedocs/readthedocs.org/issues/2569 master_doc = 'index'