nextstrain / sphinx-theme

A Sphinx theme for Nextstrain's documentation, based on Read The Docs' default theme.
https://docs.nextstrain.org/projects/sphinx-theme/
MIT License
0 stars 5 forks source link

Enable sphinx-copybutton extension by default #24

Closed tsibley closed 2 years ago

tsibley commented 2 years ago

The sphinx-copybutton extension could be enabled by default for any doc project using this theme, leading to a more consistent click-to-copy of code blocks across all our Sphinx projects.

I believe the theme's setup(app) just needs to do:

app.setup_extension("sphinx_copybutton")

with sphinx-copybutton added to the theme's setup.py.

See also https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.setup_extension.

Context: