From 652224ea7f6ea533825621c5416411b9377bd310 Mon Sep 17 00:00:00 2001 From: keisuke umezawa Date: Fri, 5 Oct 2018 00:51:51 +0900 Subject: [PATCH] Update show_on_colaboratory.py --- docs/source/_ext/show_on_colaboratory.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/_ext/show_on_colaboratory.py b/docs/source/_ext/show_on_colaboratory.py index 712ce6c..966e05c 100644 --- a/docs/source/_ext/show_on_colaboratory.py +++ b/docs/source/_ext/show_on_colaboratory.py @@ -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)