Skip to content

Commit

Permalink
Update conf.py
Browse files Browse the repository at this point in the history
Add link to github sources
  • Loading branch information
DorianDepriester authored Jan 14, 2025
1 parent 10c9880 commit e9315ee
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.autosectionlabel',
'sphinx.ext.mathjax' ]
'sphinx.ext.mathjax',
'sphinx.ext.linkcode']
templates_path = ['_templates']
exclude_patterns = []

Expand All @@ -43,3 +44,10 @@
numpydoc_class_members_toctree = False
autoclass_content = 'both'

def linkcode_resolve(domain, info):
if domain != 'py':
return None
if not info['module']:
return None
filename = info['module'].replace('.', '/')
return f"https://github.com/DorianDepriester/Elasticipy/blob/main/{filename}.py"

0 comments on commit e9315ee

Please sign in to comment.