sort versions desc
This commit is contained in:
parent
a855d28c06
commit
a8cb405bc1
7
conf.py
7
conf.py
@ -293,9 +293,10 @@ def _generate_alternate_urls(app, pagename, templatename, context, doctree):
|
|||||||
_alternate_versions = app.config.versions and app.config.versions.split(',') or []
|
_alternate_versions = app.config.versions and app.config.versions.split(',') or []
|
||||||
context['alternate_versions'] = [
|
context['alternate_versions'] = [
|
||||||
(_alternate_version, _build_url(_version=_alternate_version))
|
(_alternate_version, _build_url(_version=_alternate_version))
|
||||||
for _alternate_version in _alternate_versions
|
for _alternate_version in sorted(_alternate_versions, reverse=True)
|
||||||
if _alternate_version != version
|
if _alternate_version != version and (
|
||||||
and (_alternate_version != 'master' or pagename.startswith('developer'))
|
_alternate_version != 'master' or pagename.startswith('developer')
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
def _localize():
|
def _localize():
|
||||||
|
Loading…
Reference in New Issue
Block a user