mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-06 14:21:14 -03:00
Warn the user when visiting old documentation
This enhances our documentation to look for the file /release_version.json in the root of our site. If found, and if it contains a RELEASE_VERSION other than this version, then unhide a banner warning about the stale documentation and linking to the current.
This commit is contained in:
@@ -35,6 +35,11 @@
|
||||
{{ searchbox() }}
|
||||
</li>
|
||||
{%- endif %}
|
||||
{# This is hidden by default, unhidden by our global shared script. #}
|
||||
<div id="old-docs-notice" style="display: none">
|
||||
This documents an old version of fish.
|
||||
<a href="{{ pathto('../current/', 1) }}">See the latest release.</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{# The sidebar goes into the *document* block, so it ends up in the document *div* so it doesn't go over the footer #}
|
||||
@@ -60,6 +65,8 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
FISH_DOCS_VERSION = "{{ version }}";
|
||||
|
||||
function copy_to_clipboard(it) {
|
||||
// Find the pre tag we're interested in.
|
||||
var pre = it.target;
|
||||
@@ -112,4 +119,5 @@
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script defer type="text/javascript" src="/docs/shared/script.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user