diff options
| author | J08nY | 2024-07-16 18:49:04 +0200 |
|---|---|---|
| committer | J08nY | 2024-07-16 18:49:04 +0200 |
| commit | 1c0dc0c70324c915ec499bda6a0f0a2b55eea20b (patch) | |
| tree | 884378029d7fb45cdab43930f507eba34aa8779f /docs/conf.py | |
| parent | c4dac30693e92a638f3416f7144fcb5f38e2713f (diff) | |
| download | pyecsca-1c0dc0c70324c915ec499bda6a0f0a2b55eea20b.tar.gz pyecsca-1c0dc0c70324c915ec499bda6a0f0a2b55eea20b.tar.zst pyecsca-1c0dc0c70324c915ec499bda6a0f0a2b55eea20b.zip | |
Diffstat (limited to 'docs/conf.py')
| -rw-r--r-- | docs/conf.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py index 771541a..c28eb52 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,7 +45,7 @@ extensions = [ 'sphinx_autodoc_typehints', 'sphinx.ext.todo', 'sphinx.ext.mathjax', - 'sphinx.ext.viewcode', + 'sphinx.ext.linkcode', 'sphinx_paramlinks', 'sphinx_design', 'nbsphinx' @@ -220,3 +220,15 @@ autoclass_content = "both" nbsphinx_allow_errors = True nbsphinx_execute = "never" + + +def linkcode_resolve(domain, info): + if domain != 'py': + return None + if not info['module']: + return None + filename = info['module'].replace('.', '/') + if "codegen" in filename: + return "https://github.com/J08nY/pyecsca-codegen/tree/master/%s.py" % filename + else: + return "https://github.com/J08nY/pyecsca/tree/master/%s.py" % filename |
