Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions docs/src/_templates/layout.html

This file was deleted.

10 changes: 10 additions & 0 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,16 @@ def _dotv(version):
},
}

# if we are building via Read The Docs and it is the latest (not stable)
if on_rtd and rtd_version == "latest":
html_theme_options[
"announcement"
] = f"""
You are viewing the <b>latest</b> unreleased documentation
<strong>{version}</strong>. You can switch to a
<a href="https://scitools-iris.readthedocs.io/en/stable/">stable</a>
version."""

rev_parse = run(["git", "rev-parse", "--short", "HEAD"], capture_output=True)
commit_sha = rev_parse.stdout.decode().strip()

Expand Down