1

有没有办法在源存储库中引用源文件(文件和行),而无需在 ReST 中明确写入 repo URL?就像是

# conf.py:
repo_root="http://github.com/some/project"

# something.rst
A good example of this is found in :repo:`examples/ex1.py`/ or :repo:`examples/ex1.py`.
4

1 回答 1

2

使用sphinx.ext.extlinks扩展。例子:

extlinks = {'repo': ('http://github.com/some/project/%s', 'repo ')}
于 2013-09-16T17:57:59.253 回答