Skip to content

Commit

Permalink
Add sphinx-copybutton extension
Browse files Browse the repository at this point in the history
  • Loading branch information
goerz committed Jan 11, 2020
1 parent 4e6a146 commit 45833a2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 24 deletions.
32 changes: 16 additions & 16 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ documentation. See :ref:`DevelopmentPrerequisites` for details.
There is also a ``Makefile`` that wraps around tox, for
convenience on Unix-based systems. In your checked-out clone, run

.. code-block:: console
.. code-block:: shell
$ make help
make help
to see the available make targets. If you cannot use ``make``, but want to use
``tox`` directly (e.g., on Windows), run

.. code-block:: console
.. code-block:: shell
$ tox -av
tox -av
to see a list of tox environments and a description.

Expand All @@ -136,13 +136,13 @@ able to run.

To create a topic-branch named ``issue1``::

$ git branch issue1
$ git checkout issue1
git branch issue1
git checkout issue1

You can then make commits, and push them to Github to trigger Continuous
Integration testing::

$ git push -u origin issue1
git push -u origin issue1

Commit early and often! At the same time, try to keep your topic branch
as clean and organized as possible. You can use amend/rebase and force-push.
Expand All @@ -157,15 +157,15 @@ We strive for a `test coverage`_ above 90%.

From a checkout of the ``doctr_versions_menu`` repository you can use

.. code-block:: console
.. code-block:: shell
$ make test
make test
to run the entire test suite, or

.. code-block:: console
.. code-block:: shell
$ tox -e py35-test,py36-test,py37-test,py38-test
tox -e py35-test,py36-test,py37-test,py38-test
if ``make`` is not available.

Expand Down Expand Up @@ -248,15 +248,15 @@ Sphinx' `napoleon extension`_).
At any point, from a checkout of the ``doctr_versions_menu``
repository, you may run

.. code-block:: console
.. code-block:: shell
$ make docs
make docs
or

.. code-block:: console
.. code-block:: shell
$ tox -e docs
tox -e docs
to generate the documentation locally.
Expand Down Expand Up @@ -301,7 +301,7 @@ When making a release via

.. code-block:: shell
$ make release
make release
the above versioning conventions will be taken into account automatically.

Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ Installation

To install the latest released version of doctr-versions-menu, run:

.. code-block:: console
.. code-block:: shell
$ pip install doctr-versions-menu
pip install doctr-versions-menu
Or, to install the latest development version of ``doctr-versions-menu`` from `Github`_.

.. code-block:: console
.. code-block:: shell
$ pip install git+https://github.com/goerz/doctr_versions_menu.git@master#egg=doctr_versions_menu
pip install git+https://github.com/goerz/doctr_versions_menu.git@master#egg=doctr_versions_menu
In practice, you probably only have to install the ``doctr-versions-menu``
package on Travis_, for generating and deploying the documentation; or, e.g.,
Expand All @@ -88,7 +88,7 @@ Showing a versions menu in your documentation requires two steps:

For example,

.. code-block:: console
.. code-block:: shell
doctr deploy --command=doctr-versions-menu --no-require-master --build-tags "$DEPLOY_DIR"
Expand Down
4 changes: 2 additions & 2 deletions docs/command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ invoke ``doctr deploy`` also with the |no_require_master_flag|_ and
For example, your ``.travis.yml`` file might include the following
for deploying previously built documentation:

.. code-block:: console
.. code-block:: shell
if [ ! -z "$TRAVIS_TAG" ]; then DEPLOY_DIR="$TRAVIS_TAG"; else DEPLOY_DIR="$TRAVIS_BRANCH"; fi
Expand All @@ -54,7 +54,7 @@ Debugging

If the ``doctr-versions-menu`` command behaves unexpectedly, add the ``--debug`` flag as follows:

.. code-block:: console
.. code-block:: shell
doctr deploy --command="doctr-versions-menu --debug" --no-require-master --build-tags "$DEPLOY_DIR"
Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
'sphinx.ext.napoleon',
'sphinx.ext.intersphinx',
'sphinx_click.ext',
'doctr_versions_menu',
'sphinx_copybutton',
'doctr_versions_menu', # here's some dogfooding!
]


Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def get_version(filename):
'sphinx-autobuild',
'sphinx-autodoc-typehints',
'sphinx-click',
'sphinx-copybutton',
'sphinx_rtd_theme', # for testing only
'travis-encrypt',
'twine',
Expand Down

0 comments on commit 45833a2

Please sign in to comment.