Skip to content

Commit 75b393d

Browse files
committed
Add section about using snippets to contributing guide
1 parent 9d3826f commit 75b393d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/contributing/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,3 +488,12 @@ If you want to display commands without output that can easily be copied, use `b
488488
```bash title="Hello, world!"
489489
echo "Hello, world!"
490490
```
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`) and included on multiple pages because it's essential that users of NCCL notice and use the environment variables.

0 commit comments

Comments
 (0)