From 8ef6603ad43155a4069896ac3f3fcd641940d876 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 7 Nov 2023 15:53:31 -0800 Subject: [PATCH] Doc: Button to Copy Code Blocks Add a copy button to every code block in the docs. --- docs/requirements.txt | 1 + docs/source/conf.py | 1 + docs/spack.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index f821723dd..fa98b0f5f 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -11,5 +11,6 @@ docutils<=0.16 pygments recommonmark sphinx>=2.0 +sphinx-copybutton sphinx-design sphinx_rtd_theme>=0.3.1 diff --git a/docs/source/conf.py b/docs/source/conf.py index fd25d31ac..0ca57de85 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -45,6 +45,7 @@ "sphinx.ext.autodoc", "sphinx.ext.mathjax", "sphinx.ext.viewcode", + "sphinx_copybutton", "sphinx_design", "sphinx_rtd_theme", "breathe", diff --git a/docs/spack.yaml b/docs/spack.yaml index 8c36ba1a0..db23b0f8c 100644 --- a/docs/spack.yaml +++ b/docs/spack.yaml @@ -23,5 +23,6 @@ spack: - py-breathe - py-recommonmark - py-pygments + - py-sphinx-copybutton - py-sphinx-design - py-sphinx-rtd-theme