in doc/ext/local.py [0:0]
def make_github_link(name, rawtext, text, lineno, inliner, options={}, content=[]):
"""
This docutils role lets us link to source code via the handy :swoc:git: markup.
"""
url = 'https://github.com/SolidWallOfCode/libswoc/blob/{}/{}'
ref = 'master'
node = nodes.reference(rawtext, os.path.basename(text), refuri=url.format(ref, text), **options)
return [node], []