From 9ae9d0e29de622c30d0625e7d124f260b3242ae3 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Tue, 29 Mar 2022 01:51:05 +0200 Subject: feat: remove "edit on githu" link outside french --- conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'conf.py') diff --git a/conf.py b/conf.py index 0873cd6..4c854b2 100644 --- a/conf.py +++ b/conf.py @@ -44,7 +44,7 @@ templates_path = ['_templates'] # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = 'fr' +language = os.environ['LANGUAGE'] # Set by make. languages = os.environ['LANGUAGES'].split(' ') @@ -76,8 +76,10 @@ exclude_patterns = [ # html_theme = 'sphinx_rtd_theme' +html_show_sourcelink = language == 'fr' + html_context = { - 'display_github': True, + 'display_github': language == 'fr', 'github_user': 'club-1', 'github_repo': 'docs', 'github_version': f'{version}/', -- cgit v1.2.3