diff options
author | Damien George <damien.p.george@gmail.com> | 2016-04-28 12:34:59 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-04-28 12:34:59 +0100 |
commit | 37d5aa1377747254ace4952b40da58a8472d6864 (patch) | |
tree | 3073eaa1ce818d617aeb90f8a5fefd6cd4f99b15 | |
parent | a6aa35af09584bdf5d52275e0d9703ca4fec4231 (diff) | |
download | micropython-37d5aa1377747254ace4952b40da58a8472d6864.tar.gz micropython-37d5aa1377747254ace4952b40da58a8472d6864.zip |
docs: Make the short port names in the port/version sidebar lowercase.
To make it neater and simpler.
-rwxr-xr-x | docs/conf.py | 13 | ||||
-rw-r--r-- | docs/templates/versions.html | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/docs/conf.py b/docs/conf.py index 3eb13460fe..5d9add1a86 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,10 +26,10 @@ from collections import OrderedDict micropy_port = os.getenv('MICROPY_PORT') or 'pyboard' tags.add('port_' + micropy_port) ports = OrderedDict(( - ('unix', ('unix', 'unix')), - ('pyboard', ('pyboard', 'the pyboard')), - ('wipy', ('WiPy', 'the WiPy')), - ('esp8266', ('ESP8266', 'the ESP8266')), + ('unix', 'unix'), + ('pyboard', 'the pyboard'), + ('wipy', 'the WiPy'), + ('esp8266', 'the ESP8266'), )) # The members of the html_context dict are available inside topindex.html @@ -38,11 +38,10 @@ 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, - 'port_short_name':ports[micropy_port][0], - 'port_name':ports[micropy_port][1], + 'port_name':ports[micropy_port], 'port_version':micropy_version, 'all_ports':[ - (port_name[0], url_pattern % (micropy_version, port_id)) + (port_id, url_pattern % (micropy_version, port_id)) for port_id, port_name in ports.items() ], 'all_versions':[ diff --git a/docs/templates/versions.html b/docs/templates/versions.html index 977aefab11..6323024ecb 100644 --- a/docs/templates/versions.html +++ b/docs/templates/versions.html @@ -1,7 +1,7 @@ <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions"> <span class="rst-current-version" data-toggle="rst-current-version"> <span class="fa fa-book"> Ports and Versions</span> - {{ port_short_name }} ({{ port_version }}) + {{ port }} ({{ port_version }}) <span class="fa fa-caret-down"></span> </span> <div class="rst-other-versions"> |