Skip to content

Commit

Permalink
doc: Fix messsage for main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Jul 20, 2023
1 parent 0a96f88 commit d88d5db
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{% extends "base.html" %}

{% block outdated %}
You're not viewing the latest version.
<a href="{{ '../' ~ base_url }}">
<strong>Click here to go to latest.</strong>
</a>
<div id="current-version"> </div>
<script>
let message = "You're not viewing the latest version."
// There is probably a nicer method retrieving the value of the
// version element but it is loaded after the outdated block
let current = window.location.pathname.split("/")[1]
if (current == "main") {
message = "This is the documentation from the 'main' branch which is not a stable release."
}
message = message + '<a href="{{ "../" ~ base_url }}"> <strong>Click here to go to latest stable release.</strong> </a>'
document.getElementById("current-version").innerHTML = message;
</script>
{{app}}
{% endblock %}

0 comments on commit d88d5db

Please sign in to comment.