Skip to content

Commit 5da3243

Browse files
committed
update main examples documentation
1 parent 5835756 commit 5da3243

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

examples/README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,24 @@ To add a new example:
2121
1. Create a new subdirectory: `examples/my_example/`
2222
2. Add your Python code: `examples/my_example/my_example.py`
2323
3. Create documentation: `examples/my_example/README.md`
24-
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.:
2525

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.
2937
3038
### Example README.md Format
3139
3240
Your README.md should include:
3341
34-
- A title (# Example Name)
42+
- A title (`# Example Name`)
3543
- Description of what the example demonstrates
3644
- 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

Comments
 (0)