From 874e930d7da66278ce22065330e3fabba14616dd Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Thu, 1 Jun 2023 20:10:07 -0700 Subject: [PATCH] Add a copy button to all code snippets in docs There is a sphinx extension (sphinx_copybutton) that enables a copy button for every code-block included in our docs. This is a nice and easy usability change. Signed-off-by: Eric Brown --- doc/requirements.txt | 1 + doc/source/conf.py | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/requirements.txt b/doc/requirements.txt index 4a92744bd..0d2074715 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -3,3 +3,4 @@ # process, which may cause wedges in the gate later. sphinx>=4.0.0 # BSD sphinx-rtd-theme>=0.3.0 +sphinx-copybutton diff --git a/doc/source/conf.py b/doc/source/conf.py index 8cd247d6e..aec140106 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,6 +12,7 @@ "sphinx.ext.doctest", "sphinx.ext.coverage", "sphinx.ext.viewcode", + "sphinx_copybutton", ] # autodoc generation is a bit aggressive and a nuisance when doing heavy