Create _ext/
and _templates/
subdirectories.
Move edit_on_github.py
into the _ext/
subdirectory.
Move sourcelink.html
into the _templates/
subdirectory.
Add the following after the import sys, os
line
sys.path.insert(0, os.path.abspath('_ext'))
Add edit_on_github
to the list of extensions
extensions = ['edit_on_github']
Configure the extension
edit_on_github_project = 'username/reponame'
edit_on_github_branch = 'master'
Make sure the template path is specified correctly
templates_path = ['_templates']
Works great! Thanks.