summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-03-09 12:43:22 +0000
committerDamien George <damien.p.george@gmail.com>2016-03-09 12:43:22 +0000
commit42ef5a156778848fe15d5a6688170e091623fd75 (patch)
tree6dea2e9221b4f3f74aa4961c756772ec83b77e5c
parent5b74bba3a3e6be2a3bab1aa735d45120181dc0fd (diff)
downloadmicropython-42ef5a156778848fe15d5a6688170e091623fd75.tar.gz
micropython-42ef5a156778848fe15d5a6688170e091623fd75.zip
docs: Allow list of versions to be specified by environment variable.
-rwxr-xr-xdocs/conf.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 6ff7cb0d95..a4ef78bc08 100755
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -34,6 +34,7 @@ ports = OrderedDict((
# The members of the html_context dict are available inside topindex.html
micropy_version = os.getenv('MICROPY_VERSION') or 'latest'
+micropy_all_versions = (os.getenv('MICROPY_ALL_VERSIONS') or 'latest').split(',')
url_pattern = '%s/en/%%s/%%s' % (os.getenv('MICROPY_URL_PREFIX') or '/',)
html_context = {
'port':micropy_port,
@@ -46,7 +47,7 @@ html_context = {
],
'all_versions':[
(ver, url_pattern % (ver, micropy_port))
- for ver in ('v1.4', 'v1.4.1', 'v1.5', 'v1.6', 'latest')
+ for ver in micropy_all_versions
],
}