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
* Update copilot-instructions.md: Expand Links & References rules
Correct and expand the links and references rules section to properly account for:
Cross references with the repo.
Non-documentation file links in the repo such as script or code.
External links to non-Microsoft sites such as W3C.
GitHub links within and outside the dotnet organization.
Microsoft Learn content links to other repos.
* Update copilot-instructions.md
* Apply suggestions from code review
Adding guardrex's suggestions.
Co-authored-by: Luke Latham <[email protected]>
* Update .github/copilot-instructions.md
Co-authored-by: Luke Latham <[email protected]>
---------
Co-authored-by: Luke Latham <[email protected]>
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+34-12Lines changed: 34 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,18 +31,40 @@ When creating a PR for an issue:
31
31
- If you cannot verify, state that explicitly in your output.
32
32
33
33
### Links and References
34
-
- Use relative links (for example, `../folder/file.md` or `./file.md`) when referencing files within this repository. Do not use absolute URLs or GitHub web links for internal content.
35
-
- For external links, always remove any language or culture segment from the URL path (such as `/en-us/`, `/fr-fr/`, `/en/`, etc.).
- For links to Microsoft Learn content in other repositories:
60
+
- Use the relative URL starting with a forward slash
61
+
- Don't include the scheme and the host (example: `https://learn.microsoft.com`) and don't include the locale (example: `en-us`)
62
+
- Example: For the target Learn website URL `https://learn.microsoft.com/en-us/dotnet/core/introduction`, use the relative URL `/dotnet/core/introduction` for the link destination
63
+
64
+
- Never use physical .md file paths in published content
65
+
- Wrong: `../blazor/index.md` or `/aspnet/core/blazor/index.md`
66
+
- Correct: `<xref:blazor/index>`
67
+
- Exception: GitHub-only content (such as README files, contributing guidelines, and other repository documentation that isn't published to learn.microsoft.com) should use an absolute URL to the markdown file (`.md` file extension)
46
68
47
69
## Repository-Specific Guidelines
48
70
- Follow the [Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/)
0 commit comments