mirror of
https://github.com/deesiigneer/pyspapi.git
synced 2026-04-20 12:35:26 +00:00
version dropdown fix
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from re import search, MULTILINE
|
||||
import os
|
||||
|
||||
project = 'pyspapi'
|
||||
copyright = '2022, deesiigneer'
|
||||
@@ -28,6 +29,10 @@ intersphinx_mapping = {
|
||||
'python': ('https://docs.python.org/3/', None),
|
||||
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
|
||||
}
|
||||
|
||||
version_match = os.environ.get("READTHEDOCS_VERSION")
|
||||
json_url = f"https://pyspapi.readthedocs.io/ru/{version_match}/_static/switcher.json"
|
||||
|
||||
intersphinx_disabled_domains = ['std']
|
||||
language = None
|
||||
locale_dirs = ["locale/"]
|
||||
@@ -67,8 +72,8 @@ html_theme_options = {
|
||||
"show_toc_level": 1,
|
||||
"navbar_start": ["navbar-logo", "version-switcher"],
|
||||
"switcher": {
|
||||
"json_url": "https://pyspapi.readthedocs.io/en/latest/_static/switcher.json",
|
||||
"version_match": "latest"
|
||||
"json_url": json_url,
|
||||
"version_match": version_match
|
||||
},
|
||||
"navigation_with_keys": True,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user