mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #2797 from shibukawa/fix/sphinxdoc
fix document download roles. download roles works only on html.
This commit is contained in:
commit
8d8e35a043
@ -9,7 +9,9 @@ Example Google Style Python Docstrings
|
||||
|
||||
:ref:`example_numpy`
|
||||
|
||||
Download: :download:`example_google.py <example_google.py>`
|
||||
.. only:: builder_html
|
||||
|
||||
Download: :download:`example_google.py <example_google.py>`
|
||||
|
||||
.. literalinclude:: example_google.py
|
||||
:language: python
|
||||
|
@ -9,7 +9,9 @@ Example NumPy Style Python Docstrings
|
||||
|
||||
:ref:`example_google`
|
||||
|
||||
Download: :download:`example_numpy.py <example_numpy.py>`
|
||||
.. only:: builder_html
|
||||
|
||||
Download: :download:`example_numpy.py <example_numpy.py>`
|
||||
|
||||
.. literalinclude:: example_numpy.py
|
||||
:language: python
|
||||
|
@ -200,6 +200,12 @@ Referencing downloadable files
|
||||
The ``example.py`` file will be copied to the output directory, and a
|
||||
suitable link generated to it.
|
||||
|
||||
Not to show unavailable download links, you should wrap whole paragraphs that
|
||||
have this role::
|
||||
|
||||
.. only:: builder_html
|
||||
|
||||
See :download:`this example script <../example.py>`.
|
||||
|
||||
Cross-referencing figures by figure number
|
||||
------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user