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
Copy file name to clipboardExpand all lines: docs/contributing/index.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -489,6 +489,32 @@ If you want to display commands without output that can easily be copied, use `b
489
489
echo "Hello, world!"
490
490
```
491
491
492
+
### Avoiding repetition using snippets
493
+
494
+
It can be useful to repeat information on different pages to increase visibility for users.
495
+
If possible, prefer linking to a primary section describing a topic instead of fully repeating text on different pages.
496
+
However, if you believe it's beneficial to actually repeat the content, consider using [snippets](https://facelessuser.github.io/pymdown-extensions/extensions/snippets/) to avoid repeated information getting out of sync on different pages.
497
+
Snippets allow including the contents of a text file in multiple places of the documentation.
498
+
499
+
For example, the recommended NCCL environment variables are defined in a text file [`docs/software/commuinication/nccl_env_vars`](https://github.com/eth-cscs/cscs-docs/blob/main/docs/software/communication/nccl_env_vars) and included on multiple pages because it's essential that users of NCCL notice and use the environment variables.
500
+
501
+
Snippets are included with `--8<-- path/to/snippet`.
502
+
For example, to include the recommended NCCL environment variables, do the following:
0 commit comments