Source

sphinx-work / doc / ext / linkcode.rst

Full commit

:mod:`sphinx.ext.linkcode` -- Add external links to source code

This extension looks at your object descriptions (.. class::, .. function:: etc.) and adds external links to code hosted somewhere on the web. The intent is similar to the sphinx.ext.viewcode extension, but assumes the source code can be found somewhere on the Internet.

In your configuration, you need to specify a :confval:`linkcode_resolve` function that returns an URL based on the object.