Skip to content

Commit 69c0704

Browse files
add referencing to docs (#1512)
This pull request adds documentation to help contributors reference other demos in their `demo.py` files. The update provides clear instructions and an example of how to create cross-links between demos using the `:doc:`demos/<demo_name>` syntax. Documentation improvements: * Added a section to `documentation/contributing.md` explaining how to reference other demos in `demo.py` files using the `:doc:`demos/<demo_name>` syntax, including a concrete example. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2b81e12 commit 69c0704

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

documentation/contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ While you are encouraged to be creative with your demo, please keep the followin
8888
- **LaTeX Macros:** Avoid using LaTeX macros within your comments. Even if they appear to work in development, they will not be displayed correctly once the demo is published.
8989
- **Author Information:** Include the author's information in the metadata.json file. See the metadata guidelines below.
9090
- **Code Formatting:** Before submitting, run your script through the [Black Python formatter](https://github.com/psf/black):
91+
- **Referencing Other Demos in `demo.py`:** You can reference other demos in your `demo.py` file using ``:doc:\`demos/<demo_name>\``` syntax. This will create a link to the specified demo in the documentation. For example, to reference the `tutorial_qft` demo, use ``:doc:\`demos/tutorial_qft\``` .
9192
9293
```bash
9394
pip install black

0 commit comments

Comments
 (0)