Add copy button to code blocks
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2415>
This commit is contained in:
parent
7d03f31052
commit
b46fdaacd5
|
@ -1,5 +1,5 @@
|
|||
FROM python:3.11
|
||||
|
||||
RUN apt-get update && apt-get install -y graphviz
|
||||
RUN pip install sphinx livereload sphinx_rtd_theme django-environ django myst-parser sphinx-design sphinx-multiversion sphinxcontrib-mermaid
|
||||
RUN pip install sphinx livereload sphinx_rtd_theme django-environ django myst-parser sphinx-design sphinx-multiversion sphinxcontrib-mermaid sphinx-copybutton
|
||||
WORKDIR /app/docs
|
||||
|
|
|
@ -52,6 +52,7 @@ extensions = [
|
|||
"sphinx_design",
|
||||
"sphinx_multiversion",
|
||||
"sphinxcontrib.mermaid",
|
||||
"sphinx_copybutton",
|
||||
]
|
||||
autodoc_mock_imports = [
|
||||
"celery",
|
||||
|
@ -253,3 +254,7 @@ smv_branch_whitelist = r"^(stable|develop)$"
|
|||
# Internationalization settings
|
||||
locale_dirs = ["locales/"]
|
||||
gettext_compact = False
|
||||
|
||||
# Don't copy prompts with copybutton
|
||||
|
||||
copybutton_exclude = '.linenos, .gp'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# This file is automatically @generated by Poetry and should not be changed by hand.
|
||||
# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand.
|
||||
|
||||
[[package]]
|
||||
name = "alabaster"
|
||||
|
@ -566,6 +566,25 @@ docs = ["sphinxcontrib-websupport"]
|
|||
lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-bugbear", "flake8-comprehensions", "flake8-simplify", "isort", "mypy (>=0.981)", "sphinx-lint", "types-requests", "types-typed-ast"]
|
||||
test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinx-copybutton"
|
||||
version = "0.5.2"
|
||||
description = "Add a copy button to each of your code cells."
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
files = [
|
||||
{file = "sphinx-copybutton-0.5.2.tar.gz", hash = "sha256:4cf17c82fb9646d1bc9ca92ac280813a3b605d8c421225fd9913154103ee1fbd"},
|
||||
{file = "sphinx_copybutton-0.5.2-py3-none-any.whl", hash = "sha256:fb543fd386d917746c9a2c50360c7905b605726b9355cd26e9974857afeae06e"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
sphinx = ">=1.8"
|
||||
|
||||
[package.extras]
|
||||
code-style = ["pre-commit (==2.12.1)"]
|
||||
rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"]
|
||||
|
||||
[[package]]
|
||||
name = "sphinx-design"
|
||||
version = "0.3.0"
|
||||
|
@ -824,4 +843,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
|
|||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.8"
|
||||
content-hash = "63ea471db0f86e235eb92b5f2e2585e3e99181d8d23a99e79b278906a322bf22"
|
||||
content-hash = "f4ae8cd44773949bbac300152c7015289228eacaed206aeb41ee2e41f6535a91"
|
||||
|
|
|
@ -18,6 +18,7 @@ myst-parser = "==0.18.1"
|
|||
|
||||
django = "==4.1.5"
|
||||
django-environ = "==0.9.0"
|
||||
sphinx-copybutton = "==0.5.2"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
|
||||
|
|
Loading…
Reference in New Issue