diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 3dbab63838..9c5176131b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,6 +14,15 @@ build: - curl - jq jobs: + post_checkout: + # Read the Docs clones with --depth 50 and without tags, so hatch-vcs cannot find + # the release tag and falls back to a "0.1.dev50" version. That is what reaches + # the docs as Sphinx's ``version`` and ``release``, so without this the published + # documentation for a release reports itself as 0.1.dev50. + # + # --unshallow errors on an already complete clone, so fall back to fetching the + # tags alone rather than ignoring every failure. + - git fetch --tags --unshallow || git fetch --tags post_create_environment: - pip install uv post_install: diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css deleted file mode 100644 index 19972cd849..0000000000 --- a/docs/_static/css/custom.css +++ /dev/null @@ -1,46 +0,0 @@ -/* 1200px for slightly wider for most monitors */ -.wy-nav-content { - max-width: 1200px !important; -} - -/* version warning badge */ -#dev-version { - display: none; -} - -#dev-version.version-warning { - display: block; -} - -p.version-warning { - position: sticky; - top: 10px; - - margin: 10px 0; - padding: 5px 10px; - border-radius: 4px; - - letter-spacing: 1px; - color: #fff; - text-shadow: 0 0 2px #000; - text-align: center; - - background: #900 repeating-linear-gradient( - 135deg, - transparent, - transparent 56px, - rgba(255, 255, 255, 0.35) 56px, - rgba(255, 255, 255, 0.35) 112px - ); -} - -p.version-warning a { - color: #fff; - text-decoration: none; - border-bottom: 1px dotted #fff; -} - -p.version-warning a:hover { - border-bottom-style: solid; -} -/* -------------------------- */ diff --git a/docs/_static/js/custom.js b/docs/_static/js/custom.js deleted file mode 100644 index 1060f4663e..0000000000 --- a/docs/_static/js/custom.js +++ /dev/null @@ -1,9 +0,0 @@ -document.addEventListener("DOMContentLoaded", function() { - let dev_version = document.getElementById("dev-version"); - let on_scikit_hep = window.location.href.indexOf("scikit-hep.org/pyhf") > -1; - - if(dev_version && on_scikit_hep){ - // are we not on readthedocs? - dev_version.classList.add("version-warning"); - } -}); diff --git a/docs/citations.rst b/docs/citations.rst index dd5471ab46..ce82869c32 100644 --- a/docs/citations.rst +++ b/docs/citations.rst @@ -1,9 +1,12 @@ Use and Citations ================= -.. raw:: html +.. ifconfig:: is_development_build -
Warning: This is a development version and should not be cited. To find the specific version to cite, please go to ReadTheDocs.
+ .. warning:: + + This is a development version and should not be cited. To find the specific + version to cite, please go to `ReadTheDocsWarning: This is a development version. The latest stable version is at ReadTheDocs.
- .. Comment: Splice the JupyterLite example into the README by looking for a particular comment