Add the Sphinx copy-button

Add the Sphinx copy-button feature to improve usability when copying code blocks and command examples.

Depends-On: I8c367e5f78ac15b28190c1d6788971681c58dacd

Change-Id: I83e9d0e4135082060f4d12803bb379ab5b981dbc
Signed-off-by: Dmitriy Chubinidze <dcu995@gmail.com>
This commit is contained in:
Dmitriy Chubinidze
2025-12-02 21:11:11 +00:00
parent a8fe58a244
commit 57d72efb54
3 changed files with 10 additions and 2 deletions
+1
View File
@@ -5,6 +5,7 @@
# this is required for the docs build jobs
sphinx>=2.0.0,!=2.1.0 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
sphinx-copybutton>=0.5.2 # MIT
openstackdocstheme>=2.2.1 # Apache-2.0
reno>=3.1.0 # Apache-2.0
doc8>=0.8.1 # Apache-2.0
+5 -1
View File
@@ -123,9 +123,13 @@ extensions = [
'openstackdocstheme',
'sphinx.ext.autodoc',
'sphinx.ext.extlinks',
'sphinxcontrib.rsvgconverter'
'sphinxcontrib.rsvgconverter',
'sphinx_copybutton'
]
# Remove the prompt text from lines
copybutton_prompt_text = "# "
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
+4 -1
View File
@@ -100,8 +100,11 @@ sys.path.insert(0, os.path.abspath('../../inventory/'))
extensions = [
'openstackdocstheme',
'sphinx.ext.autodoc',
'sphinx.ext.extlinks'
'sphinx.ext.extlinks',
'sphinx_copybutton'
]
# Remove the prompt text from lines
copybutton_prompt_text = "# "
# Add any paths that contain templates here, relative to this directory.
# templates_path = ['_templates']