mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Add version switcher to Sphinx docs
This commit is contained in:
parent
4c89ce5f27
commit
04cc5b459a
35
doc/sphinx/_static/doc-versions.json
Normal file
35
doc/sphinx/_static/doc-versions.json
Normal file
@ -0,0 +1,35 @@
|
||||
[
|
||||
{
|
||||
"name": "3.0 (dev)",
|
||||
"version": "3.0",
|
||||
"url": "/documentation/dev/sphinx/html/"
|
||||
},
|
||||
{
|
||||
"version": "2.6.0 (stable)",
|
||||
"url": "/documentation/docs-2.6/sphinx/html/"
|
||||
},
|
||||
{
|
||||
"version": "2.5.1",
|
||||
"url": "/documentation/docs-2.5/sphinx/html/"
|
||||
},
|
||||
{
|
||||
"version": "2.4.0",
|
||||
"url": "/documentation/docs-2.4/sphinx/html/"
|
||||
},
|
||||
{
|
||||
"version": "2.3.0",
|
||||
"url": "/documentation/docs-2.3/sphinx/html/"
|
||||
},
|
||||
{
|
||||
"version": "2.2.1",
|
||||
"url": "/documentation/docs-2.2/sphinx/html/"
|
||||
},
|
||||
{
|
||||
"version": "2.1.2",
|
||||
"url": "/documentation/docs-2.1/sphinx/html/"
|
||||
},
|
||||
{
|
||||
"version": "2.0.2",
|
||||
"url": "/documentation/docs-2.0/sphinx/html/"
|
||||
}
|
||||
]
|
@ -176,11 +176,26 @@ html_theme = 'pydata_sphinx_theme'
|
||||
html_theme_options = {
|
||||
"show_toc_level": 2,
|
||||
"navbar_center": ["cantera-org-links"],
|
||||
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
|
||||
"logo": {
|
||||
"link": "/index.html",
|
||||
"alt_text": "Cantera",
|
||||
},
|
||||
"primary_sidebar_end": ["numfocus"],
|
||||
"switcher": {
|
||||
"json_url": "/documentation/dev/sphinx/html/_static/doc-versions.json",
|
||||
# "json_url": "https://cantera.org/doc-versions.json",
|
||||
"version_match": version,
|
||||
},
|
||||
"check_switcher": False,
|
||||
"icon_links": [
|
||||
{
|
||||
"name": "GitHub",
|
||||
"url": "https://github.com/Cantera/cantera",
|
||||
"icon": "fa-brands fa-square-github",
|
||||
"type": "fontawesome",
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
|
Loading…
Reference in New Issue
Block a user