fix(docs): use https redirect pages for VS Code settings badges#43
Merged
Merged
Conversation
Follow-up to Azure#41. The badges added in Azure#41 used vscode:// and vscode-insiders:// hrefs, which GitHub's markdown sanitizer strips. Without an href, clicking the badge image opens the SVG full-screen (image lightbox) in github.com and in the GitHub PR review surfaces instead of opening VS Code. Replace the badge targets with https URLs to small static redirect pages on the Docusaurus site that meta-refresh into the vscode:// URI. HTTPS hrefs survive sanitization, so the badges now work in github.com, the GitHub Pull Requests extension, the VS Code markdown preview, and the published docs site. - README.md: badges link to https://azure.github.io/git-ape/open-settings*.html - website/docs/getting-started/installation.md: same badges using Docusaurus pathname:/// prefix so they resolve at any baseUrl - website/static/open-settings.html: new redirect to vscode://settings/... - website/static/open-settings-insiders.html: new redirect to vscode-insiders://settings/...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #41.
Problem
The badges added in #41 use
vscode://andvscode-insiders://URIs as their link targets:GitHub's markdown sanitizer only allows a limited set of URL schemes (
http,https,mailto,ftp,irc,git, …). Custom schemes likevscode://are stripped fromhrefattributes when the markdown is rendered to HTML.The badge image is then left without an enclosing anchor. Clicking an unlinked image triggers GitHub's image lightbox, so the badge SVG opens full-screen instead of opening VS Code. This reproduces in:
Fix
Point the badges at small static HTTPS redirect pages hosted on the Docusaurus site. HTTPS hrefs survive sanitization, and the redirect page meta-refreshes into the
vscode://URI (with a JS fallback and a manual button).Changes
https://azure.github.io/git-ape/open-settings.htmland…/open-settings-insiders.html.pathname:///link prefix so the URL resolves to the static file at anybaseUrl(works locally on/and in production on/git-ape/).vscode://settings/chat.plugins.marketplaces.vscode-insiders://settings/chat.plugins.marketplaces.Verification
vscode://URIs.