Skip to content

Commit 42ef5a1

Browse files
committed
docs: Allow list of versions to be specified by environment variable.
1 parent 5b74bba commit 42ef5a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
# The members of the html_context dict are available inside topindex.html
3636
micropy_version = os.getenv('MICROPY_VERSION') or 'latest'
37+
micropy_all_versions = (os.getenv('MICROPY_ALL_VERSIONS') or 'latest').split(',')
3738
url_pattern = '%s/en/%%s/%%s' % (os.getenv('MICROPY_URL_PREFIX') or '/',)
3839
html_context = {
3940
'port':micropy_port,
@@ -46,7 +47,7 @@
4647
],
4748
'all_versions':[
4849
(ver, url_pattern % (ver, micropy_port))
49-
for ver in ('v1.4', 'v1.4.1', 'v1.5', 'v1.6', 'latest')
50+
for ver in micropy_all_versions
5051
],
5152
}
5253

0 commit comments

Comments
 (0)