Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Update snippets' readme #1721

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Snippets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ public static void MySnippet()
}
```

In your Markdown documentation, refer to your code snippet by adding `<!-- snippet: my-snippet -->` and `<!-- endSnippet -->` comments to your Markdown file.
In your Markdown documentation, refer to your code snippet by adding `snippet: my-snippet`.
martintmk marked this conversation as resolved.
Show resolved Hide resolved

When you're finished editing, run the `dotnet mdsnippets` command from the root directory of the repository to refresh all the snippets throughout all the Markdown files.

> [!NOTE]
> If you refer to a non-existing snippet (due to typo or unsaved changes) then `dotnet mdsnippets` will warn you.
>
> _Failed: Missing snippets: markdown-path.md: non-existing-snippet_

[MarkdownSnippets]: https://github.com/SimonCropp/MarkdownSnippets