瀏覽代碼

docs: add copy clipboard button to code blocks

Mikael Koli 3 年之前
父節點
當前提交
a4860fb2d7
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      docs/conf.py
  2. 2 1
      requirements/docs.txt

+ 1 - 0
docs/conf.py

@@ -35,6 +35,7 @@ extensions = [
     'sphinx.ext.napoleon',
     'sphinx.ext.napoleon',
     'sphinx_book_theme',
     'sphinx_book_theme',
     'sphinx.ext.extlinks',
     'sphinx.ext.extlinks',
+    'sphinx_copybutton',
 ]
 ]
 rst_prolog = """
 rst_prolog = """
 .. include:: <s5defs.txt>
 .. include:: <s5defs.txt>

+ 2 - 1
requirements/docs.txt

@@ -1,3 +1,4 @@
 sphinx >= 1.7.5
 sphinx >= 1.7.5
 pydata-sphinx-theme
 pydata-sphinx-theme
-sphinx_book_theme
+sphinx_book_theme
+sphinx-copybutton