Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
add copybutton for shell commands to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rjdbcm committed Aug 21, 2021
1 parent d913dd4 commit 6bc98f1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/_static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ a img.logo {
border-color:#181a1b
}

button.copybtn {
opacity: 1;
}


.wy-side-nav-search {
text-align: -moz-center;
}
Expand Down
6 changes: 5 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme"
"sphinx_rtd_theme",
"sphinx_copybutton"
]
copybutton_only_copy_prompt_lines = True
copybutton_prompt_text = "$ "
copybutton_selector = "div.highlight-shell pre"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pyrsistent==0.18.0
Pygments==2.10.0
Cython==0.29.24
numpy==1.21.2
sphinx-copybutton==0.4.0

0 comments on commit 6bc98f1

Please sign in to comment.