diff --git a/docs/conf.py b/docs/conf.py index a50d09c6e..09dc4ebeb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,6 +34,7 @@ extensions = [ "djangodocs", "sphinx.ext.intersphinx", + "sphinx_copybutton", ] # templates_path = ["_templates"] @@ -57,3 +58,9 @@ html_theme = "furo" html_static_path = ["_static"] + +# -- Options for copy button ------------------------------------------------- +# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#use-and-customize + +copybutton_prompt_text = r">>> |\.\.\. |\$ " +copybutton_prompt_is_regexp = True diff --git a/pyproject.toml b/pyproject.toml index e5d3c0cf4..29c1563df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ classifiers = [ docs = [ "sphinx>=7", "furo>=2025.7.19", + "sphinx-copybutton", ] [project.urls]