doc/main/index: Unify IDE and main build.

The `only` directive can be used to include content selectively. It cannot be used to select a different TOC, which is why we resorted to separate doc builds before.

Now that we have dropped EV3 references from the docs, we can use a single build and just customize the content on the landing page with the only directive.

The docs can now be built with:

# Main docs:
make -C doc html SPHINXOPTS=-tmain

# IDE docs:
make -C doc html SPHINXOPTS=-tide
This commit is contained in:
Laurens Valk
2021-07-23 11:25:51 +02:00
parent e4c7e5abeb
commit fbd843cb54
+65 -29
View File
@@ -1,54 +1,90 @@
Pybricks API Documentation
Pybricks Documentation
==================================================================
`Pybricks <https://pybricks.com/>`_ is Python coding for smart LEGO® hubs.
Run MicroPython scripts
directly on the hub, and get full control of your motors and sensors.
.. only:: main
Pybricks runs on LEGO® BOOST, City, Technic, MINDSTORMS®, and SPIKE®. You can
code using Windows, Mac, Linux, Chromebook, and Android.
`Pybricks <https://pybricks.com/>`_ is Python coding for smart LEGO® hubs.
Run MicroPython scripts
directly on the hub, and get full control of your motors and sensors.
**What's on this page?**
Pybricks runs on LEGO® BOOST, City, Technic, MINDSTORMS®, and SPIKE®. You
can code using Windows, Mac, Linux, Chromebook, and Android.
This page provides API documentation and short example snippets. If you're new
to Pybricks, or if you're looking for bigger example projects, check out
the `Pybricks website`_ instead.
**What's on this page?**
This page provides API documentation and short example snippets. If you're
new to Pybricks, or if you're looking for bigger example projects, check out
the `Pybricks website`_ instead.
.. note:: Are you using LEGO MINDSTORMS EV3? Check out the
`EV3 documentation`_ instead.
.. note:: Are you using LEGO MINDSTORMS EV3? Check out the
`EV3 documentation`_ instead.
**Installation**
**Installation**
To run Pybricks MicroPython scripts, you must update the firmware on the hub.
To get started, click one of the platforms below.
To run Pybricks MicroPython scripts, you must update the firmware on the
hub. To get started, click one of the platforms below.
.. list-table::
.. list-table::
* - **Technic Hub, City Hub, BOOST Move Hub**
- **SPIKE Prime Hub / MINDSTORMS Inventor Hub**
* - **Technic Hub, City Hub, BOOST Move Hub**
- **SPIKE Prime Hub / MINDSTORMS Inventor Hub**
* - .. figure:: ../main/images/powereduphubs.png
:target: https://pybricks.com/install/technic-boost-city/
* - .. figure:: ../main/images/powereduphubs.png
:target: https://pybricks.com/install/technic-boost-city/
- .. figure:: ../main/images/primeinventorhub.png
:target: https://pybricks.com/install/spike-mindstorms/
- .. figure:: ../main/images/primeinventorhub.png
:target: https://pybricks.com/install/spike-mindstorms/
Once installed, Pybricks works the same for all hubs.
check out the Pybricks modules in the left hand menu to see what
you can do.
Once installed, Pybricks works the same for all hubs.
check out the Pybricks modules in the left hand menu to see what
you can do.
**Get involved!**
Got questions or issues? Please share your
findings on our `support page`_ so we can make Pybricks even better.
*Thank you!*
.. only:: ide
.. note::
**You are using a new beta version of Pybricks!**
This is great for trying the very latest features, but some things
might not work.
If in doubt, use the `latest stable release`_. Please report any
issues via our `support page`_. Thanks!
To begin, install the Pybricks firmware on your hub. Check
`pybricks.com/install`_ to learn how.
Use the ☰ menu to navigate all available classes, methods, and tools. A few
commonly used devices and classes are listed below for quick reference.
.. rubric:: Programmable Hubs
.. figure:: ../main/images/hubsoverview.png
:width: 100 %
:target: hubs/index.html
.. rubric:: Powered Up Motors and Sensors
.. figure:: ../main/images/pupdevicesoverview.png
:width: 100 %
:target: pupdevices/index.html
**Get involved!**
Got questions or issues? Please share your
findings on our `support page`_ so we can make Pybricks even better.
*Thank you!*
.. _support page: https://github.com/pybricks/support/issues/
.. _EV3 documentation: https://pybricks.com/ev3-micropython/
.. _Pybricks website: https://pybricks.com/
.. _pybricks.com/install: https://pybricks.com/install/
.. _latest stable release: https://www.code.pybricks.com/
.. toctree::
:maxdepth: 1