From ee4eae884b137054e10f21a44f0d1d427405e310 Mon Sep 17 00:00:00 2001 From: edenlightning <66261195+edenlightning@users.noreply.github.com> Date: Wed, 19 Aug 2020 18:59:45 -0400 Subject: [PATCH] [docs] Add copy and toggle buttons to sphinx (#3054) * Support sphinx toggle and copy buttons * add buttons to conf --- docs/source/conf.py | 2 ++ requirements/docs.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index f62b540720..9ed08ab8a2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -96,7 +96,9 @@ extensions = [ # 'm2r', 'nbsphinx', 'sphinx_autodoc_typehints', + 'sphinx_copybutton', 'sphinx_paramlinks', + 'sphinx_togglebutton', ] # Add any paths that contain templates here, relative to this directory. diff --git a/requirements/docs.txt b/requirements/docs.txt index 7678dbdea4..0f8f2005b8 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -10,3 +10,5 @@ https://github.com/PyTorchLightning/lightning_sphinx_theme/archive/master.zip#eg # pip_shims sphinx-autodoc-typehints sphinx-paramlinks<0.4.0 +sphinx-togglebutton +sphinx-copybutton