如何从 Sphinx 文档创建 link 到本地 index.html?
How to create link to local index.html from Sphinx documentation?
我正在为 Sphinx/rst 编写一些文档。我怎样才能 link 到本地磁盘上与您正在查看的页面相关的内容?
例如:
====================
My App documentation
====================
The official My App documentation can be found here:
https://myapp.com/docs
A local mirror is available:
../../_static/docs_mirror/index.html
在我的机器上,_static 文件夹位于:
file:///Users/fredrik/code/repos/myapp/docs/_static
...但我不想对该路径进行硬编码,因为该路径对于已下载克隆存储库的另一个用户来说可能不是同一路径。
这是一种方法:
`local mirror <_static/docs_mirror/index.html>`_
另一个选项:
`local mirror`_
.. _local mirror: _static/docs_mirror/index.html
参考:http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#hyperlink-references.
我正在为 Sphinx/rst 编写一些文档。我怎样才能 link 到本地磁盘上与您正在查看的页面相关的内容?
例如:
====================
My App documentation
====================
The official My App documentation can be found here:
https://myapp.com/docs
A local mirror is available:
../../_static/docs_mirror/index.html
在我的机器上,_static 文件夹位于:
file:///Users/fredrik/code/repos/myapp/docs/_static
...但我不想对该路径进行硬编码,因为该路径对于已下载克隆存储库的另一个用户来说可能不是同一路径。
这是一种方法:
`local mirror <_static/docs_mirror/index.html>`_
另一个选项:
`local mirror`_
.. _local mirror: _static/docs_mirror/index.html
参考:http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#hyperlink-references.