sphinx-copybutton for docs, closes #1748

This commit is contained in:
Simon Willison 2022-05-20 12:11:08 -07:00
commit 1465fea479
2 changed files with 8 additions and 2 deletions

View file

@ -31,7 +31,7 @@
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = ["sphinx.ext.extlinks", "sphinx.ext.autodoc"] extensions = ["sphinx.ext.extlinks", "sphinx.ext.autodoc", "sphinx_copybutton"]
extlinks = { extlinks = {
"issue": ("https://github.com/simonw/datasette/issues/%s", "#"), "issue": ("https://github.com/simonw/datasette/issues/%s", "#"),

View file

@ -64,7 +64,13 @@ setup(
""", """,
setup_requires=["pytest-runner"], setup_requires=["pytest-runner"],
extras_require={ extras_require={
"docs": ["sphinx_rtd_theme", "sphinx-autobuild", "codespell", "blacken-docs"], "docs": [
"sphinx_rtd_theme",
"sphinx-autobuild",
"codespell",
"blacken-docs",
"sphinx-copybutton",
],
"test": [ "test": [
"pytest>=5.2.2,<7.2.0", "pytest>=5.2.2,<7.2.0",
"pytest-xdist>=2.2.1,<2.6", "pytest-xdist>=2.2.1,<2.6",