[IMP] only show master in switcher on developer doc pages

This commit is contained in:
Victor Feyens 2021-03-08 17:30:31 +01:00
parent 9a436fb206
commit d84d4aece8

View File

@ -292,7 +292,9 @@ def _generate_alternate_urls(app, pagename, templatename, context, doctree):
_alternate_versions = app.config.versions and app.config.versions.split(',') or []
context['alternate_versions'] = [
(_alternate_version, _build_url(_version=_alternate_version))
for _alternate_version in _alternate_versions if _alternate_version != version
for _alternate_version in _alternate_versions
if _alternate_version != version
and (_alternate_version != 'master' or pagename.startswith('developer'))
]
def _localize():