diff --git a/docs/.readthedocs.yml b/docs/.readthedocs.yml new file mode 100644 index 00000000..a39bf7be --- /dev/null +++ b/docs/.readthedocs.yml @@ -0,0 +1,10 @@ +version: 2 + +python: + version: 3.7 + install: + - method: pip + path: . + extra_requirements: + - sphinx-version-warning + diff --git a/docs/conf.py b/docs/conf.py index e5047625..40604e3a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 https://www.rapids.science 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.