You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4.Run the documentation generator: `python3 scripts/generate_examples_docs.py`
24
+
4.Create a documentation page at `docs/user-guide/examples/my_example.md`. The documentation page should simply link to the `README.md` and the source code, e.g.:
25
25
26
-
The documentation generator will automatically:
27
-
- Create a documentation page at `docs/user-guide/examples/my_example.md`
28
-
- Update `mkdocs.yml` to include the new example in the navigation
26
+
````
27
+
# docs/user-guide/examples/my_example.md
28
+
--8<-- "examples/my_example/README.md"
29
+
30
+
## Source Code
31
+
32
+
```python
33
+
--8<-- "examples/my_example/my_example.py"
34
+
```
35
+
````
36
+
5. Update `mkdocs.yml` to include the new example in the navigation.
29
37
30
38
### Example README.md Format
31
39
32
40
Your README.md should include:
33
41
34
-
- A title (# Example Name)
42
+
- A title (`# Example Name`)
35
43
- Description of what the example demonstrates
36
44
- Instructions for running the example
37
-
38
-
**Note:** The source code will be automatically appended to the documentation when you run the generator script.
0 commit comments