Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to diagnose why the notebook links go to master not the release b… #411

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,17 @@
# 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

<div class="admonition note">
<pre>{{ env.config }}</pre>
<pre>{{ github_version }}</pre>
<pre>{{ current_version }}</pre>
<pre>{{ commit }}</pre>
<pre>{{ env.config.html_context }}</pre>
<p>This page was generated from
<a class="reference external" href="https://github.com/pygae/clifford/blob/{{ git_ref|e }}/{{ docname|e }}">{{ docname|e }}</a>.
Interactive online version:
Expand Down