diff --git a/docs/conf.py b/docs/conf.py
index bb8faea88e..e85a689030 100755
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -21,42 +21,21 @@ import os
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('.'))
-# Work out the port to generate the docs for
-from collections import OrderedDict
-micropy_port = os.getenv('MICROPY_PORT') or 'pyboard'
-tags.add('port_' + micropy_port)
-ports = OrderedDict((
- ('unix', 'unix'),
- ('pyboard', 'the pyboard'),
- ('wipy', 'the WiPy'),
- ('esp8266', 'the ESP8266'),
-))
-
# 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 '/',)
+url_pattern = '%s/en/%%s' % (os.getenv('MICROPY_URL_PREFIX') or '/',)
html_context = {
- 'port':micropy_port,
- 'port_name':ports[micropy_port],
- 'port_version':micropy_version,
- 'all_ports':[
- (port_id, url_pattern % (micropy_version, port_id))
- for port_id, port_name in ports.items()
- ],
+ 'cur_version':micropy_version,
'all_versions':[
- (ver, url_pattern % (ver, micropy_port))
- for ver in micropy_all_versions
+ (ver, url_pattern % ver) for ver in micropy_all_versions
],
'downloads':[
- ('PDF', url_pattern % (micropy_version, 'micropython-%s.pdf' % micropy_port)),
+ ('PDF', url_pattern % micropy_version + '/micropython-docs.pdf'),
],
}
-# Specify a custom master document based on the port name
-master_doc = micropy_port + '_' + 'index'
-
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
@@ -86,7 +65,7 @@ source_suffix = '.rst'
#source_encoding = 'utf-8-sig'
# The master toctree document.
-#master_doc = 'index'
+master_doc = 'index'
# General information about the project.
project = 'MicroPython'
@@ -323,24 +302,3 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('http://docs.python.org/3.5', None)}
-
-# Append the other ports' specific folders/files to the exclude pattern
-exclude_patterns.extend([port + '*' for port in ports if port != micropy_port])
-
-modules_port_specific = {
- 'pyboard': ['pyb'],
- 'wipy': ['wipy'],
- 'esp8266': ['esp'],
-}
-
-modindex_exclude = []
-
-for p, l in modules_port_specific.items():
- if p != micropy_port:
- modindex_exclude += l
-
-# Exclude extra modules per port
-modindex_exclude += {
- 'esp8266': ['cmath', 'select'],
- 'wipy': ['cmath'],
-}.get(micropy_port, [])
diff --git a/docs/esp8266/general.rst b/docs/esp8266/general.rst
index fe1cdc1c65..020e21df62 100644
--- a/docs/esp8266/general.rst
+++ b/docs/esp8266/general.rst
@@ -1,3 +1,5 @@
+.. _esp8266_general:
+
General information about the ESP8266 port
==========================================
diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst
index c510e40640..95ae55b570 100644
--- a/docs/esp8266/quickref.rst
+++ b/docs/esp8266/quickref.rst
@@ -1,4 +1,4 @@
-.. _quickref:
+.. _esp8266_quickref:
Quick reference for the ESP8266
===============================
@@ -9,6 +9,15 @@ Quick reference for the ESP8266
The Adafruit Feather HUZZAH board (image attribution: Adafruit).
+Below is a quick reference for ESP8266-based boards. If it is your first time
+working with this board please consider reading the following sections first:
+
+.. toctree::
+ :maxdepth: 1
+
+ general.rst
+ tutorial/index.rst
+
Installing MicroPython
----------------------
diff --git a/docs/esp8266/tutorial/index.rst b/docs/esp8266/tutorial/index.rst
index 39b4592600..0a4b5f2a66 100644
--- a/docs/esp8266/tutorial/index.rst
+++ b/docs/esp8266/tutorial/index.rst
@@ -1,4 +1,4 @@
-.. _tutorial-index:
+.. _esp8266_tutorial:
MicroPython tutorial for ESP8266
================================
diff --git a/docs/esp8266_index.rst b/docs/esp8266_index.rst
deleted file mode 100644
index 519acecda5..0000000000
--- a/docs/esp8266_index.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-MicroPython documentation and references
-========================================
-
-.. toctree::
-
- esp8266/quickref.rst
- esp8266/general.rst
- esp8266/tutorial/index.rst
- library/index.rst
- reference/index.rst
- genrst/index.rst
- license.rst
diff --git a/docs/wipy_index.rst b/docs/index.rst
similarity index 80%
rename from docs/wipy_index.rst
rename to docs/index.rst
index 15c04c0fba..af5ffb885a 100644
--- a/docs/wipy_index.rst
+++ b/docs/index.rst
@@ -3,10 +3,10 @@ MicroPython documentation and references
.. toctree::
- wipy/quickref.rst
- wipy/general.rst
- wipy/tutorial/index.rst
library/index.rst
reference/index.rst
genrst/index.rst
license.rst
+ pyboard/quickref.rst
+ esp8266/quickref.rst
+ wipy/quickref.rst
diff --git a/docs/pyboard/general.rst b/docs/pyboard/general.rst
index 97e9aabc0b..0fc7332ded 100644
--- a/docs/pyboard/general.rst
+++ b/docs/pyboard/general.rst
@@ -1,3 +1,5 @@
+.. _pyboard_general:
+
General information about the pyboard
=====================================
@@ -77,4 +79,6 @@ including setting up the serial prompt and downloading new firmware using
DFU programming:
`PDF guide
- MicroPython runs on a variety of systems and each has their own specific - documentation. You are currently viewing the documentation for - {{ port_name }}. + MicroPython runs on a variety of systems and hardware platforms. Here you can read + the general documentation which applies to all systems, as well as specific information + about the various platforms - + also known as ports + - that MicroPython runs on.
- - -Documentation for MicroPython and {{ port_name }}:
+General documentation for MicroPython:
- {% if port in ("pyboard", "wipy", "esp8266") %}
-
- Quick reference for {{ port_name }}
- General information about {{ port_name }}
- Tutorials and code examples
Library Reference
MicroPython Differences |
References and tutorials for specific platforms:
+ +
+
+ Quick reference for the pyboard
+ Quick reference for the ESP8266
+ Quick reference for the WiPy/CC3200 |
+
Indices and tables:
+
@@ -82,7 +79,7 @@ MicroPython terms explained
- Table of contents |