Skip to content

Cleanup documentation URLs#6117

Open
StephanTLavavej wants to merge 5 commits intomicrosoft:mainfrom
StephanTLavavej:doc-urls
Open

Cleanup documentation URLs#6117
StephanTLavavej wants to merge 5 commits intomicrosoft:mainfrom
StephanTLavavej:doc-urls

Conversation

@StephanTLavavej
Copy link
Member

Today I learned that our documentation team recommends omitting locale/version information from URLs (unless linking to a specific version is desired). So while I generally prefer to avoid URLs that get rewritten (except when intentionally using a redirector), following this recommendation is desirable and makes the URLs a bit shorter. I've manually verified that all of these updated URLs still work.

  • (https://learn\.microsoft\.com/)en-us/([^ ?#]+)(?:\?view=([^ #]+))? => $1$2
  • Reduce the Feedback Hub URL.
    • Like DevCom URLs, everything after the number is ignored.
  • Expand shortened URLs, reduce A/W file differences.
    • I had created these shortened URLs purely to stay within 120 columns.
  • Drop ?tabs=powershell.
  • Drop redundant DevCom URL.

There's one URL which still incurs a major redirect, where .github/ISSUE_TEMPLATE/question.md cites https://help.github.com/en/github/managing-your-work-on-github/creating-a-permanent-link-to-a-code-snippet which redirects to https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet, but that exceeds 120 columns so I'm not changing it (and it isn't worth the additional confusion of linking to the parent doc node).

@StephanTLavavej StephanTLavavej requested a review from a team as a code owner February 27, 2026 13:55
@StephanTLavavej StephanTLavavej added the documentation Related to documentation or comments label Feb 27, 2026
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Feb 27, 2026
@StephanTLavavej StephanTLavavej moved this from Initial Review to Final Review in STL Code Reviews Feb 27, 2026
// Entry:
// LPCWSTR LocaleName - locale context for the comparison.
// DWORD dwCmpFlags - see https://aka.ms/stl/comparestringex
// DWORD dwCmpFlags - https://learn.microsoft.com/windows/win32/api/stringapiset/nf-stringapiset-comparestringex
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two URLs are different from the other two

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there were two pairs of URLs. I replaced each with what they expand to, then dropped the /en-us component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Related to documentation or comments

Projects

Status: Final Review

Development

Successfully merging this pull request may close these issues.

3 participants