Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
woutdenolf committed Apr 24, 2024
1 parent 2e526a3 commit 1699659
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/_ext/myhdf5_inline_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ def inject_dynamic_url_js(app, pagename, templatename, context, doctree):
<script>
document.addEventListener("DOMContentLoaded", function() {
var links = document.querySelectorAll("a.myhdf5");
var currentURL = encodeURIComponent(window.location.href + "_static/");
var currentURL = window.location.href.replace("index.html", "");
var resourceURL = encodeURIComponent(currentURL + "_static/");
links.forEach(function(link) {
var href = link.getAttribute("href");
link.setAttribute("href", href.replace("placeholder", currentURL));
link.setAttribute("href", href.replace("placeholder", resourceURL));
});
});
</script>
Expand Down

0 comments on commit 1699659

Please sign in to comment.