Skip to content

Commit

Permalink
Automatically install sphinx-copybutton (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage authored Oct 31, 2024
1 parent 25ccf64 commit 908db73
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"sphinx.ext.viewcode",
"sphinx_wagtail_theme",
"myst_parser",
"sphinx_copybutton",
]
templates_path = ["_templates"]
source_suffix = {
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
sphinx
sphinx-intl
myst_parser
sphinx_copybutton
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ classifiers =

[options]
packages = find:
install_requires =
sphinx-copybutton
python_requires = >=3.8
include_package_data = True

Expand Down
1 change: 1 addition & 0 deletions sphinx_wagtail_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def update_context(app, pagename, templatename, context, doctree):
def setup(app):
"""Setup functionality called by Sphinx"""
app.connect("html-page-context", update_context)
app.setup_extension("sphinx_copybutton")
if hasattr(app, "add_html_theme"):
theme_path = os.path.abspath(os.path.dirname(__file__))
app.add_html_theme("sphinx_wagtail_theme", theme_path)
Expand Down

0 comments on commit 908db73

Please sign in to comment.