【发布时间】:2016-07-09 11:46:33
【问题描述】:
我正在为 Sphinx/rst 编写一些文档。如何链接到与您正在查看的页面相关的本地磁盘上的内容?
例如:
====================
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
...但我不想对该路径进行硬编码,因为该路径可能与另一个已下载克隆存储库的用户的路径不同。
【问题讨论】:
-
@mzjn 是的,非常好,效果很好:
`local mirror <_static/docs_mirror/index.html>`_。如果您在此处添加答案,我会将其标记为正确答案。
标签: python-sphinx restructuredtext