Skip to content

Commit 53d9d42

Browse files
committed
fix(docs): Apply suggestions and leftover substitutions
1 parent ea77f7c commit 53d9d42

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

docs/conf_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from esp_docs.conf_docs import * # noqa: F403,F401
44

5-
# Used by sphinx_substitution_extensions for substituting variables in the documentation
5+
# Used for substituting variables in the documentation
66
rst_prolog = """
77
.. |version| replace:: 3.2.0
88
.. |idf_version| replace:: 5.4
@@ -33,7 +33,7 @@
3333
extensions += [ # noqa: F405
3434
"sphinx_copybutton",
3535
"sphinx_tabs.tabs",
36-
"sphinx_substitution_extensions",
36+
"sphinx_substitution_extensions", # For allowing substitutions inside code blocks
3737
"esp_docs.esp_extensions.dummy_build_system",
3838
]
3939

docs/en/esp-idf_component.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ For a simplified method, see `Installing using Boards Manager <https://docs.espr
1414
If you plan to use these modified settings multiple times, for different projects and targets, you can recompile the Arduino core with the new settings using the Arduino Static Library Builder.
1515
For more information, see the `Lib Builder documentation <lib_builder.html>`_.
1616

17-
.. note:: Latest Arduino Core ESP32 version (|version|) is now compatible with `ESP-IDF v5.1 <https://github.com/espressif/esp-idf/tree/release/v5.1>`_. Please consider this compatibility when using Arduino as a component in ESP-IDF.
17+
.. note:: Latest Arduino Core ESP32 version (|version|) is now compatible with ESP-IDF v\ |idf_version|\ . Please consider this compatibility when using Arduino as a component in ESP-IDF.
1818

19-
For easiest use of Arduino framework as a ESP-IDF component, you can use the `IDF Component Manager <https://docs.espressif.com/projects/esp-idf/en/v5.1.4/esp32/api-guides/tools/idf-component-manager.html>`_ to add the Arduino component to your project.
19+
For easiest use of Arduino framework as a ESP-IDF component, you can use the `IDF Component Manager <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html>`_ to add the Arduino component to your project.
2020
This will automatically clone the repository and its submodules. You can find the Arduino component in the `ESP Registry <https://components.espressif.com/components/espressif/arduino-esp32>`_ together with dependencies list and examples.
2121

2222
Installation

docs/en/guides/docs_contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Before starting your collaboration, you need to get the documentation source cod
4949
Requirements
5050
************
5151

52-
To properly work with the documentation, you need to install some packages in your system. Note that depending on
52+
To build the documentation properly, you need to install some packages in your system. Note that depending on
5353
your system, you may need to use a virtual environment to install the packages.
5454

5555
.. code-block::

docs/en/lib_builder.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,9 @@ You have two options to run the Docker image to build the libraries. Manually or
293293
To run the Docker image manually, use the following command from the root of the ``arduino-esp32`` repository:
294294

295295
.. code-block:: bash
296+
:substitutions:
296297
297-
docker run --rm -it -v $PWD:/arduino-esp32 -e TERM=xterm-256color espressif/esp32-arduino-lib-builder:release-v5.1
298+
docker run --rm -it -v $PWD:/arduino-esp32 -e TERM=xterm-256color espressif/esp32-arduino-lib-builder:release-v|idf_version|
298299
299300
This will start the Lib Builder UI for compiling the libraries. The above command explained:
300301

@@ -304,7 +305,7 @@ This will start the Lib Builder UI for compiling the libraries. The above comman
304305
- ``-t`` Allocate a pseudo-TTY;
305306
- ``-e TERM=xterm-256color``: Optional. Sets the terminal type to ``xterm-256color`` to display colors correctly;
306307
- ``-v $PWD:/arduino-esp32``: Optional. Mounts the current folder at ``/arduino-esp32`` inside the container. If not provided, the container will not copy the compiled libraries to the host machine;
307-
- ``espressif/esp32-arduino-lib-builder:release-v5.1``: uses Docker image ``espressif/esp32-arduino-lib-builder`` with tag ``release-v5.1``.
308+
- :substitution-code:`espressif/esp32-arduino-lib-builder:release-v|idf_version|`: uses Docker image ``espressif/esp32-arduino-lib-builder`` with tag :substitution-code:`release-v|idf_version|`.
308309
The ``latest`` tag is implicitly added by Docker when no tag is specified. It is recommended to use a specific version tag to ensure reproducibility of the build process.
309310

310311
.. warning::
@@ -324,24 +325,27 @@ By default the docker container will run the user interface script. If you want
324325
For example, to run a terminal inside the container, you can run:
325326

326327
.. code-block:: bash
328+
:substitutions:
327329
328-
docker run -it espressif/esp32-arduino-lib-builder:release-v5.1 /bin/bash
330+
docker run -it espressif/esp32-arduino-lib-builder:release-v|idf_version| /bin/bash
329331
330332
Running the Docker image using the provided run script will depend on the host OS.
331333
Use the following command from the root of the ``arduino-esp32`` repository to execute the image in a Linux or macOS environment for
332-
the ``release-v5.1`` tag:
334+
the :substitution-code:`release-v|idf_version|` tag:
333335

334336
.. code-block:: bash
337+
:substitutions:
335338
336-
curl -LJO https://raw.githubusercontent.com/espressif/esp32-arduino-lib-builder/refs/heads/release/v5.1/tools/docker/run.sh
339+
curl -LJO https://raw.githubusercontent.com/espressif/esp32-arduino-lib-builder/refs/heads/release/v|idf_version|/tools/docker/run.sh
337340
chmod +x run.sh
338341
./run.sh $PWD
339342
340343
For Windows, use the following command in PowerShell from the root of the ``arduino-esp32`` repository:
341344

342345
.. code-block:: powershell
346+
:substitutions:
343347
344-
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/espressif/esp32-arduino-lib-builder/refs/heads/release/v5.1/tools/docker/run.ps1" -OutFile "run.ps1"
348+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/espressif/esp32-arduino-lib-builder/refs/heads/release/v|idf_version|/tools/docker/run.ps1" -OutFile "run.ps1"
345349
.\run.ps1 $pwd
346350
347351
As the script is unsigned, you may need to change the execution policy of the current session before running the script.

0 commit comments

Comments
 (0)