有没有办法在源存储库中引用源文件(文件和行),而无需在 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`.
有没有办法在源存储库中引用源文件(文件和行),而无需在 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`.
使用sphinx.ext.extlinks扩展。例子:
extlinks = {'repo': ('http://github.com/some/project/%s', 'repo ')}