Skip to content

Commit 714c69e

Browse files
committed
docs: remove unused documentation embedding settings and add examples section in contributing guide
1 parent a0f8b37 commit 714c69e

File tree

2 files changed

+35
-7
lines changed

2 files changed

+35
-7
lines changed

docs/en/conf.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,3 @@
3131

3232
# Tracking ID for Google Analytics
3333
google_analytics_id = "G-F58JM78930"
34-
35-
# Documentation embedding settings
36-
# docs_embed_public_root = "https://docs.espressif.com/projects/arduino-esp32-wokwi-test"
37-
# docs_embed_esp32_relative_root = "../.."
38-
# docs_embed_launchpad_url = "https://espressif.github.io/esp-launchpad/"
39-
# docs_embed_github_base_url = "https://github.com/JakubAndrysek/arduino-esp32"
40-
# docs_embed_github_branch = "docs-embed"

docs/en/contributing.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,41 @@ Also:
109109
const char * WIFI_FTM_SSID = "WiFi_FTM_Responder"; // SSID of AP that has FTM Enabled
110110
const char * WIFI_FTM_PASS = "ftm_responder"; // STA Password
111111
112+
113+
Examples
114+
********
115+
116+
All libraries in the Arduino ESP32 core has its own examples. You can found them in the ``libraries/<library_name>/examples/`` folder.
117+
118+
The purpose of these examples is to demonstrate how to use the library features and provide a starting point for users.
119+
120+
If you want to show the example in the documentation, you have two options:
121+
1. link just the source code file in the documentation using the ``literalinclude`` directive:
122+
123+
.. code-block:: rst
124+
125+
.. literalinclude:: ../../../libraries/<library_name>/examples/<example_name>/<example_name>.ino
126+
:language: arduino
127+
128+
2. Source code with Wokwi simulation embedded in the documentation using the ``wokwi-example`` directive:
129+
130+
.. code-block:: rst
131+
132+
.. wokwi-example:: libraries/<library_name>/examples/<example_name>/<example_name>.ino
133+
134+
To enable compiling the example in the CI system, you need to add a ``ci.yml`` file in the same folder as the sketch.
135+
The ``ci.yml`` file is used to specify some configurations for the CI system, like required configurations, supported targets, and more.
136+
You can enable compilation of the example by adding targets under the ``upload-binary`` directive in the ``ci.yml`` file.
137+
138+
Here is an example of a ``ci.yml`` file that enables compilation for ESP32 and ESP32-S3 targets:
139+
140+
.. code-block:: yaml
141+
142+
upload-binary:
143+
targets:
144+
- esp32
145+
- esp32s3
146+
112147
Testing
113148
*******
114149

0 commit comments

Comments
 (0)