Skip to content

Add sphinx-copybutton for enhanced documentation interactivity#65

Merged
douglatornell merged 7 commits intomainfrom
sphinx-copybutton
Feb 25, 2026
Merged

Add sphinx-copybutton for enhanced documentation interactivity#65
douglatornell merged 7 commits intomainfrom
sphinx-copybutton

Conversation

@douglatornell
Copy link
Member

@douglatornell douglatornell commented Feb 24, 2026

Integrate the sphinx-copybutton extension into the documentation to improve user experience by adding copy buttons to code blocks. Update Sphinx configuration and documentation files to support this feature. Adjust command prompts for consistency across examples.

Added `sphinx-copybutton` as a requirement in the Pixi default
environment to enhance code block interaction in the generated
documentation. Updated `pixi.lock` and `requirements.txt`
accordingly to include the new dependency.
Included the `sphinx_copybutton` extension in the Sphinx
configuration file. This enhances the user experience by adding
convenient copy buttons to code blocks in the generated documentation.
* Set prompt text regex
* Respect bash line continuation character
* Add a `no-copybutton` class that can be used to suppress the copy button
@douglatornell douglatornell added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 24, 2026
Replaced `code-block:: bash` with `code-block:: console` across multiple
documentation files for compatibility with `sphinx_copybutton` extension.
Added `$` prompt to a few command examples where it was missing.
Replaced `code-block:: bash` with `code-block:: console` across multiple
documentation files for compatibility with `sphinx_copybutton` extension.
Added `$` prompt to a few command examples where it was missing.
Added the `:class: no-copybutton` directive to relevant `code-block`
sections. This ensures that copy buttons do not appear in
output-only code examples, improving clarity and user experience.
@douglatornell douglatornell merged commit 5efa380 into main Feb 25, 2026
3 checks passed
@douglatornell douglatornell deleted the sphinx-copybutton branch February 25, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant