Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

docs: Add sphinx-copybutton extension #1332

Merged

Conversation

matthewfeickert
Copy link
Contributor

@matthewfeickert matthewfeickert commented Oct 5, 2021

Resolves #1324

This PR adds sphinx-copybutton as a dev dependency in pyproject.toml and then adds it to the list of Sphinx extensions in docs/source/conf.py.

Resulting in the ability to do things like this in the docs

copybutton

This PR also corrects a very tiny typo in the CONTRIBUTING docs.

This allows for the docs to have a clickable copy button for all code
snippets.
$ flit install --help |& grep -e '-s'
usage: flit install [-h] [-s] [--pth-file] [--user] [--env] [--python PYTHON]
  -s, --symlink         Symlink the module/package into site packages instead
Copy link
Member

@astrojuanlu astrojuanlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @matthewfeickert ! This is a small, but beautiful improvement 😍

@astrojuanlu
Copy link
Member

(Test failure is #1132)

@astrojuanlu astrojuanlu merged commit 2cfa8e1 into poliastro:main Oct 5, 2021
@matthewfeickert matthewfeickert deleted the docs/add-sphinx-copybutton branch October 5, 2021 18:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add sphinx-copybutton to documentation
2 participants