Skip to content

Commit

Permalink
Update show_on_colaboratory.py
Browse files Browse the repository at this point in the history
  • Loading branch information
keisuke-umezawa committed Oct 4, 2018
1 parent e69e5b5 commit 652224e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/source/_ext/show_on_colaboratory.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def get_colaboratory_url(path):


def html_page_context(app, pagename, templatename, context, doctree):
if templatename != 'page.html':
return

path = os.path.relpath(doctree.get('source'), app.builder.srcdir).replace('notebook/', '')
show_url = get_colaboratory_url(path)

Expand Down

0 comments on commit 652224e

Please sign in to comment.