Skip to content
Snippets Groups Projects
Commit 7ca1bd31 authored by Daniel Campora's avatar Daniel Campora Committed by Damien George
Browse files

docs: Generate a separate docs build for each port.

Using Damien's approach where conf.py and topindex.html are
shared by all ports.
parent 031278f6
No related branches found
No related tags found
No related merge requests found
Showing
with 57 additions and 18 deletions
...@@ -134,7 +134,7 @@ else: ...@@ -134,7 +134,7 @@ else:
# The name of an image file (relative to this directory) to place at the top # The name of an image file (relative to this directory) to place at the top
# of the sidebar. # of the sidebar.
#html_logo = '../logo/trans-logo.png' #html_logo = '../../logo/trans-logo.png'
# The name of an image file (within the static path) to use as favicon of the # The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
...@@ -277,3 +277,23 @@ texinfo_documents = [ ...@@ -277,3 +277,23 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library. # Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None} intersphinx_mapping = {'http://docs.python.org/': None}
# 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", "esp8266"),
))
# The members of the html_context dict are available inside topindex.html
url_prefix = os.getenv('MICROPY_URL_PREFIX') or '/'
html_context = {
'port':micropy_port,
'port_name':ports[micropy_port],
'all_ports':[(n, url_prefix + p) for p, n in ports.items()],
}
Micro Python documentation contents Micro Python documentation contents
=================================== ===================================
.. only:: port_pyboard
.. toctree::
pyboard/quickref.rst
pyboard/general.rst
pyboard/tutorial/index.rst
library/index.rst
pyboard/hardware/index.rst
license.rst
.. only:: port_esp8266
.. toctree:: .. toctree::
quickref.rst
general.rst
tutorial/index.rst
library/index.rst library/index.rst
hardware/index.rst
license.rst license.rst
Micro Python documentation and references Micro Python documentation and references
========================================= =========================================
.. only:: port_pyboard
.. toctree::
pyboard/quickref.rst
pyboard/general.rst
pyboard/tutorial/index.rst
library/index.rst
pyboard/hardware/index.rst
license.rst
contents.rst
.. only:: port_esp8266
.. toctree:: .. toctree::
quickref.rst
general.rst
tutorial/index.rst
library/index.rst library/index.rst
hardware/index.rst
license.rst license.rst
contents.rst contents.rst
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment