Skip to content

Commit

Permalink
Fix notebook links for stable version (icaros-usc#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
btjanaka authored Jul 8, 2021
1 parent 730f4c2 commit fe9ca06
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/_templates/sourcelink.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@
<a class="md-nav__extra_link"
{# Insert a Colab link for all Python notebooks. Notebooks are assumed to
be under the docs folder -- unless they are tutorials, in which case they
are under the examples folder. #}
are under the examples folder. If "stable" is in the docstitle, then this
is a stable release, so the tutorial link should point to the version tag
on GitHub. Otherwise, this is the "latest" release, so we point to master.
#}
href="{{
"https://colab.research.google.com/github/icaros-usc/pyribs/blob/master/" +
"https://colab.research.google.com/github/icaros-usc/pyribs/blob/" +
("master/" if docstitle.find("stable") == -1 else "v" + version + "/") +
("examples/" if sourcename.startswith("tutorials/") else "docs/") +
sourcename[:-4]
}}">
Expand Down

0 comments on commit fe9ca06

Please sign in to comment.