Skip to content

Commit

Permalink
Add documentation for docs live mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Feb 18, 2024
1 parent 01c0b70 commit 0c1621c
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions docs/how-to/contribute-docs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,65 @@ Once your development environment is set up, run:
The output of the file should be in the ``docs/_build/html`` folder. If there
are any markup problems, they'll raise an error.

Live documentation preview
--------------------------

To support rapid editing of documentation, Toga also has a "live preview" mode:

.. tabs::

.. group-tab:: macOS

.. code-block:: console
(venv) $ tox -e docs-live
.. group-tab:: Linux

.. code-block:: console
(venv) $ tox -e docs-live
.. group-tab:: Windows

.. code-block:: doscon
(venv) C:\...>tox -e docs-live
This will build the documentation, start a web server to serve the build documentation,
and watch the file system for any changes to the documentation source. If a change is
detected, the documentation will be rebuilt, and any browser viewing the modified page
will be automatically refreshed.

Live preview mode will only monitor the ``docs`` directory for changes. If you're
updating the inline documentation associated with Toga source code, you'll need to use
the ``docs-live-src`` target to build docs:

.. tabs::

.. group-tab:: macOS

.. code-block:: console
(venv) $ tox -e docs-live-src
.. group-tab:: Linux

.. code-block:: console
(venv) $ tox -e docs-live-src
.. group-tab:: Windows

.. code-block:: doscon
(venv) C:\...>tox -e docs-live-src
This behaves the same as ``docs-live``, but will also monitor any changes to the
``core/src`` folder, reflecting any changes to inline documentation. However, the
rebuild process takes much longer, so you may not want to use this target unless
you're actively editing inline documentation.

Documentation linting
---------------------

Expand Down

0 comments on commit 0c1621c

Please sign in to comment.