下载角色不适用于阅读文档
Download roles are not working on Read the Docs
我正在尝试下载 link 以使用 reStructuredText (reST) 和 Sphinx 阅读文档。在 download role 的 reST 文档中,提供下载 link 的示例给出为
.. only:: builder_html
See :download:`this example script <../example.py>`.
在本地制作 html 源代码时,link 会出现,但在阅读文档时使用 GitHub linked 项目时,它们不会出现。
如 this GitHub Issue 中所述,阅读文档使用其自己的构建器 readthedocs
。因此,要包含下载链接,您还必须包含此构建器。例如
.. only:: builder_html or readthedocs
See :download:`this example script <../example.py>`.
我正在尝试下载 link 以使用 reStructuredText (reST) 和 Sphinx 阅读文档。在 download role 的 reST 文档中,提供下载 link 的示例给出为
.. only:: builder_html
See :download:`this example script <../example.py>`.
在本地制作 html 源代码时,link 会出现,但在阅读文档时使用 GitHub linked 项目时,它们不会出现。
如 this GitHub Issue 中所述,阅读文档使用其自己的构建器 readthedocs
。因此,要包含下载链接,您还必须包含此构建器。例如
.. only:: builder_html or readthedocs
See :download:`this example script <../example.py>`.