Add sphinx version warning package

old_docs
JulioV 2020-12-03 18:11:29 -05:00
parent 640890c7b4
commit 683d3abe24
2 changed files with 19 additions and 2 deletions

View File

@ -0,0 +1,10 @@
version: 2
python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- sphinx-version-warning

View File

@ -26,7 +26,14 @@ import sys
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = []
import versionwarning
version = release = versionwarning.version
versionwarning_messages = {
'latest': 'These are the old docs for RAPIDS beta. Got to <a href="https://www.rapids.science">https://www.rapids.science</a> for the latest',
}
versionwarning_banner_title = 'Deprecated Version'
versionwarning_body_selector = 'div[itemprop="articleBody"]'
extensions = ['versionwarning.extension']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -120,7 +127,7 @@ html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.