Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
6c629e4e8d
commit
44a4f123f8
1 changed files with 25 additions and 0 deletions
25
docs/conf.py
25
docs/conf.py
|
|
@ -3,6 +3,8 @@
|
||||||
# For the full list of built-in configuration values, see the documentation:
|
# For the full list of built-in configuration values, see the documentation:
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||||
|
|
||||||
|
|
@ -49,6 +51,12 @@ html_show_sphinx = False
|
||||||
html_copy_source = False
|
html_copy_source = False
|
||||||
html_show_sourcelink = False
|
html_show_sourcelink = False
|
||||||
|
|
||||||
|
# Le sélecteur de version est piloté par le workflow de publication : hors CI
|
||||||
|
# ces variables sont absentes, le sélecteur n'apparaît pas, et le build ne
|
||||||
|
# dépend d'aucun réseau.
|
||||||
|
_docs_base_url = os.environ.get('DOCS_BASE_URL')
|
||||||
|
_docs_version = os.environ.get('DOCS_VERSION')
|
||||||
|
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
'home_page_in_toc': True,
|
'home_page_in_toc': True,
|
||||||
'use_download_button': False,
|
'use_download_button': False,
|
||||||
|
|
@ -61,3 +69,20 @@ html_theme_options = {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _docs_base_url and _docs_version:
|
||||||
|
html_theme_options['switcher'] = {
|
||||||
|
'json_url': f'{_docs_base_url}/switcher.json',
|
||||||
|
'version_match': _docs_version,
|
||||||
|
}
|
||||||
|
# Le thème book vide navbar_start et place tout dans la barre latérale : le
|
||||||
|
# sélecteur doit donc y être inséré explicitement, à côté du logo.
|
||||||
|
html_sidebars = {
|
||||||
|
'**': [
|
||||||
|
'navbar-logo.html',
|
||||||
|
'icon-links.html',
|
||||||
|
'version-switcher.html',
|
||||||
|
'search-button-field.html',
|
||||||
|
'sbt-sidebar-nav.html',
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue