Proposal: Django documentation snippet copy button

A ticket came up today requesting something I’ve also been wanting in the Django documentation, adding a “copy button” to code snippets: #34846 ("Enhancing User Experience: The Need for a 'Copy' Button in Django Website Code Blocks") – Django

Sarah linked to an existing PR to include the sphinx-copybutton plugin: added sphinx copy button to commands by VenkataBhaskarr · Pull Request #16342 · django/django · GitHub. At first glances this plugin looks nice as it can handle pycon snippets by removing prompts & output.

Thoughts?

1 Like

I think this would be a nice addition.

The extension you mention is part of the Executable books project, so it’s likely a safe (well maintained into the future) dependency to take on.

2 Likes