Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
Show linkgalleries examples only when rendering html
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed Jul 26, 2017
1 parent 3151fb2 commit 31a1c35
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions docs/linkgalleries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,35 @@ The outputs of
psyplot
are links to the examples in
:ref:`psyplots example gallery <psyplot:gallery_examples>`
with the corresponding images:
:ref:`psyplots example gallery <psyplot:gallery_examples>`.

.. linkgalleries::
.. only:: html

psyplot
This then transforms to

where we have defined the :confval:`intersphinx_mapping` configuration value in
the ``conf.py`` script like
.. linkgalleries::

psyplot

In the ``conf.py`` script, the :confval:`intersphinx_mapping` configuration
value then looks like

.. code-block:: python
intersphinx_mapping = {
'psyplot': ('http://psyplot.readthedocs.io/en/latest/', None),
}
We can also insert links into the library of this project by just inserting the
name of the project. In our case (``sphinx-nbexamples``) this would then look
like
We can also insert links into the library of the current project by just
inserting the name of the project.

.. linkgalleries::
.. only:: html

sphinx-nbexamples
In our case (``sphinx-nbexamples``) this then looks like

.. linkgalleries::

sphinx-nbexamples

The :rst:dir:`linkgalleries` directive also accepts multiple packages, e.g.

Expand Down

0 comments on commit 31a1c35

Please sign in to comment.