[docs] Add link master <-> latest via sphinx version warnings (#8010)

This commit is contained in:
Richard Liaw
2020-04-13 15:21:08 -07:00
committed by GitHub
parent 4a81793ba5
commit e68d601ec7
3 changed files with 24 additions and 5 deletions
+13
View File
@@ -63,8 +63,21 @@ extensions = [
'sphinx-jsonschema',
'sphinx_gallery.gen_gallery',
'sphinx_copybutton',
'versionwarning.extension',
]
versionwarning_messages = {
"master": (
"This document is for the master branch. "
'Visit the <a href="/en/latest/">latest pip release documentation here</a>.'
),
"latest": (
"This document is for the latest pip release. "
'Visit the <a href="/en/master/">master branch documentation here</a>.'
),
}
versionwarning_body_selector = "div.document"
sphinx_gallery_conf = {
"examples_dirs": ["../examples", "tune/guides"], # path to example scripts
# path where to save generated examples