docs: Unify all the ports into one set of documentation.

With this commit there is now only one entry point into the whole
documentation, which describes the general MicroPython language, and then
from there there are links to information about specific platforms/ports.

This commit doesn't change content (almost, it does fix a few internal
links), it just reorganises things.
This commit is contained in:
Damien George
2018-09-27 17:27:57 +10:00
parent 5cc9517fc5
commit b3e013f60e
19 changed files with 84 additions and 135 deletions

View File

@@ -9,43 +9,20 @@
</p>
<p>
MicroPython runs on a variety of systems and each has their own specific
documentation. You are currently viewing the documentation for
<strong>{{ port_name }}</strong>.
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 <a href="{{ pathto("reference/glossary") }}#term-micropython-port">ports</a>
- that MicroPython runs on.
</p>
<!--p>
Documentation for other systems are available:
{% for p in all_ports %}
<a href="{{ p[1] }}">{{ p[0] }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}.
</p-->
<p><strong>Documentation for MicroPython and {{ port_name }}:</strong></p>
<p><strong>General documentation for MicroPython:</strong></p>
<table class="contentstable"><tr>
<td width="40%" style="padding-left:2em;">
{% if port in ("pyboard", "wipy", "esp8266") %}
<p class="biglink">
<a class="biglink" href="{{ pathto(port + "/quickref") }}">Quick reference for {{ port_name }}</a><br/>
<span class="linkdescr">pinout for {{ port_name }} and snippets of useful code</span>
</p>
<p class="biglink">
<a class="biglink" href="{{ pathto(port + "/general") }}">General information about {{ port_name }}</a><br/>
<span class="linkdescr">read this first for a quick overview</span>
</p>
<p class="biglink">
<a class="biglink" href="{{ pathto(port + "/tutorial/index") }}">Tutorials and code examples</a><br/>
<span class="linkdescr">start here</span>
</p>
{% endif %}
<p class="biglink">
<a class="biglink" href="{{ pathto("library/index") }}">Library Reference</a><br/>
{% if port == "pyboard" %}
<span class="linkdescr">MicroPython libraries, including the <a href="{{ pathto("library/pyb") }}">pyb module</a></span>
{% else %}
<span class="linkdescr">MicroPython libraries, including the <a href="{{ pathto("library/machine") }}">machine module</a></span>
{% endif %}
<span class="linkdescr">MicroPython libraries and modules</span>
</p>
<p class="biglink">
<a class="biglink" href="{{ pathto("genrst/index") }}">MicroPython Differences</a><br/>
@@ -64,7 +41,27 @@
</td>
</tr></table>
<p><strong>References and tutorials for specific platforms:</strong></p>
<table class="contentstable"><tr>
<td width="40%" style="padding-left:2em;">
<p class="biglink">
<a class="biglink" href="{{ pathto("pyboard/quickref") }}">Quick reference for the pyboard</a><br/>
<span class="linkdescr">pinout for the pyboard, snippets of useful code, and a tutorial</span>
</p>
<p class="biglink">
<a class="biglink" href="{{ pathto("esp8266/quickref") }}">Quick reference for the ESP8266</a><br/>
<span class="linkdescr">pinout for ESP8266-based boards, snippets of useful code, and a tutorial</span>
</p>
<p class="biglink">
<a class="biglink" href="{{ pathto("wipy/quickref") }}">Quick reference for the WiPy/CC3200</a><br/>
<span class="linkdescr">pinout for the WiPy/CC3200, snippets of useful code, and a tutorial</span>
</p>
</td>
</tr></table>
<p><strong>Indices and tables:</strong></p>
<table class="contentstable"><tr>
<td width="40%" style="padding-left:2em;">
<p class="biglink">
@@ -82,7 +79,7 @@
<span class="linkdescr">MicroPython terms explained</span>
</p>
<p class="biglink">
<a class="biglink" href="{{ pathto(port + "_index") }}">Table of contents</a><br/>
<a class="biglink" href="{{ pathto("index") }}">Table of contents</a><br/>
<span class="linkdescr">a list of all sections and subsections</span>
</p>
</td></tr>

View File

@@ -1,16 +1,10 @@
<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 }} ({{ port_version }})
<span class="fa fa-book"> Versions and Downloads</span>
{{ cur_version }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>Ports</dt>
{% for slug, url in all_ports %}
<dd><a href="{{ url }}">{{ slug }}</a></dd>
{% endfor %}
</dl>
<dl>
<dt>Versions</dt>
{% for slug, url in all_versions %}
@@ -27,7 +21,7 @@
<dl>
<dt>External links</dt>
<dd>
<a href="http://www.micropython.org">micropython.org</a>
<a href="https://www.micropython.org">micropython.org</a>
</dd>
<dd>
<a href="https://github.com/micropython/micropython">GitHub</a>