PSScriptAnalyzer icon indicating copy to clipboard operation
PSScriptAnalyzer copied to clipboard

(MAINT) Update URLs for site rebrand

Open sdwheeler opened this issue 3 years ago • 4 comments

PR Summary

The docs site has been rebranded. The URL changed from docs.microsoft.com to learn.microsoft.com. URLs pointing to docs.microsoft.com are redirected but the need to be updated to avoid the redirection.

This PR updates the URLs to point to the new hostname.

PR Checklist

sdwheeler avatar Sep 20 '22 16:09 sdwheeler

See related PR https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/pull/103

sdwheeler avatar Sep 20 '22 16:09 sdwheeler

See related PR MicrosoftDocs/PowerShell-Docs-Modules#103

I do not see the same changes to the markdown files in the Rules folder that are in this PR.

bergmeister avatar Sep 20 '22 16:09 bergmeister

I do not see the same changes to the markdown files in the Rules folder that are in this PR.

That's because the Docs repo uses site-relative links that omit the hostname portion of the URL. We can switch to site-relative links in the source code repo but that means that the URLs don't work when viewed from GitHub. Are there Pester tests for links? If not then it would be safe to switch to site-relative links in the source and make publishing the docs easier at release time.

sdwheeler avatar Sep 20 '22 16:09 sdwheeler

I just pushed a new commit to restore full URLs in the source files that had been converted to site-relative.

I remember now from discussions with Jim, we want to use full URLs in the source because the source docs for a tagged release need to have working URLs. We need to convert them links to site-relative when the files are copied to the docs repository.

sdwheeler avatar Sep 20 '22 17:09 sdwheeler

@sdwheeler When I updated my other MSDocs PR with this, I found that the below change was not synced back to PSSA repo: https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/commit/747cff56148e7f8b04df3ca5bb5faeb42590ac7b#diff-7f36cb7cb779ee3d32ec0749bba06c5a5fbd5398106c748acf80fee400ce7115

bergmeister avatar Sep 24 '22 20:09 bergmeister