diff options
Diffstat (limited to 'conf.py')
-rw-r--r-- | conf.py | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -10,7 +10,7 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os +import os # import sys # sys.path.insert(0, os.path.abspath('.')) @@ -21,6 +21,7 @@ project = 'CLUB1' copyright = '2022, Nicolas PEUGNET' author = 'Nicolas PEUGNET' version = 'main' +release = version # -- General configuration --------------------------------------------------- @@ -46,6 +47,9 @@ templates_path = ['_templates'] # Usually you set "language" from the command line for these cases. language = 'fr' +# Set by make. +languages = os.environ['LANGUAGES'].split(' ') + # Use a single POT and PO file par language. gettext_compact = 'package' @@ -71,10 +75,11 @@ exclude_patterns = [ html_theme = 'sphinx_rtd_theme' html_context = { - 'display_github': True, - 'github_user': 'club-1', - 'github_repo': 'docs', - 'github_version': 'main/', + 'display_github': True, + 'github_user': 'club-1', + 'github_repo': 'docs', + 'github_version': f'{version}/', + 'languages': [(lang, f'../{lang}/') for lang in languages], } html_theme_options = { |