Skip to content

Commit

Permalink
Fixes using absolute uri for all links
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Apr 17, 2024
1 parent 1d33d27 commit b3a36cf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doc/source/_templates/versions.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{% if READTHEDOCS or display_lower_left %}
{# Add rst-badge after rst-versions for small badge style. #}
<script type="text/javascript">
$.get("../../../versions/versions.json", function(data) {
let versionElement = $("#versions");
let baseUriRegex = /(.*\/cime).*/g;
let baseUri = baseUriRegex.exec(document.baseURI);
let baseUriRegex = /(.*\/cime).*/g;
let baseUri = baseUriRegex.exec(document.baseURI);

console.log(baseUri);
$.get(`${baseUri}/versions/versions.json`, function(data) {
let versionElement = $("#versions");

Object.keys(data).forEach(function(key) {
let value = data[key];
Expand Down

0 comments on commit b3a36cf

Please sign in to comment.