From 7ab95762b1ea5da9bc8ff94ea0c946a0ec176ae1 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Fri, 23 Jul 2021 09:48:03 +0100 Subject: [PATCH 1/5] Try to diagnose why the notebook links go to master not the release branch --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 6880fdb5..93b4d863 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,6 +80,9 @@ .. raw:: html
+
}{{ config }}
+
}{{ vars(config) }}
+
}{{ config.html_context }}

This page was generated from {{ docname|e }}. Interactive online version: From 77a99cb38cfb0c9ca30a8f5caf07f512dfd7b0c2 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Fri, 23 Jul 2021 09:57:51 +0100 Subject: [PATCH 2/5] Update conf.py --- docs/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 93b4d863..ca45d63a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -81,7 +81,6 @@

}{{ config }}
-
}{{ vars(config) }}
}{{ config.html_context }}

This page was generated from {{ docname|e }}. From 04fd2a330a52c242fbbf201bbd1c55cf4b3675e1 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Fri, 23 Jul 2021 10:12:54 +0100 Subject: [PATCH 3/5] Update conf.py --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index ca45d63a..8f1b9947 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,8 +80,8 @@ .. raw:: html

-
}{{ config }}
-
}{{ config.html_context }}
+
}{{ env.config }}
+
}{{ env.config.html_context }}

This page was generated from {{ docname|e }}. Interactive online version: From 8349b77c17b99ad4be2a46c40a63613aec9f3a05 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Fri, 23 Jul 2021 10:22:31 +0100 Subject: [PATCH 4/5] Update conf.py --- docs/conf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8f1b9947..19e67f31 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,8 +80,11 @@ .. raw:: html

-
}{{ env.config }}
-
}{{ env.config.html_context }}
+
{{ env.config }}
+
{{ github_version }}
+
{{ current_version }}
+
{{ commit }}
+
{{ env.config.html_context }}

This page was generated from {{ docname|e }}. Interactive online version: From 80d7eaffe538d6668c4dac68ff9999b5efc4e2b3 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Fri, 23 Jul 2021 10:30:34 +0100 Subject: [PATCH 5/5] Update conf.py --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 19e67f31..abf5a993 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -74,8 +74,8 @@ # This is processed by Jinja2 and inserted before each notebook nbsphinx_prolog = r""" {% set docname = 'docs/' + env.doc2path(env.docname, base=None) %} -{% set git_ref = 'master' if not READTHEDOCS else - commit if '.' not in current_version else +{% set git_ref = 'master' if not env.config.html_context['READTHEDOCS'] else + env.config.html_context['github_version'] if '.' not in env.config.html_context['current_version'] else 'v' + env.config.release %} .. raw:: html