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

Issue 3328 correctly point notebook download URLs according to versions #3333

Merged
Prev Previous commit
Next Next commit
#3328 update jinja templating for GitHub notebook links
agriyakhetarpal committed Sep 13, 2023
commit 3d710d880449bdf7d17e30f4a7d148b2d3c97e48
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -344,8 +344,8 @@
'github/pybamm-team/pybamm/blob/develop/docs/' +
env.doc2path(env.docname, base=None) %}

{% set readthedocs_download_url =
'https://docs.pybamm.org/en/latest/' %}
{% set notebooks_version = env.config.html_context.notebooks_version %}
{% set github_download_url = env.config.html_context.github_download_url %}

{% set doc_path = env.doc2path(env.docname, base=None) %}

@@ -366,7 +366,7 @@
<hr>
<p>
Alternatively, you may
<a href="{{ readthedocs_download_url | e }}{{ doc_path | e }}"
<a href="{{ github_download_url | e }}/docs/{{ doc_path | e }}"
target="_blank" download>
download this notebook</a> and run it offline.
</p>