Skip to content

fix(docs): use https redirect pages for VS Code settings badges#43

Merged
dawright22 merged 1 commit into
Azure:mainfrom
arnaudlh:fix/vscode-settings-link-redirect
May 5, 2026
Merged

fix(docs): use https redirect pages for VS Code settings badges#43
dawright22 merged 1 commit into
Azure:mainfrom
arnaudlh:fix/vscode-settings-link-redirect

Conversation

@arnaudlh

@arnaudlh arnaudlh commented May 5, 2026

Copy link
Copy Markdown
Member

Follow-up to #41.

Problem

The badges added in #41 use vscode:// and vscode-insiders:// URIs as their link targets:

[![](badge.svg)](vscode://settings/chat.plugins.marketplaces)

GitHub's markdown sanitizer only allows a limited set of URL schemes (http, https, mailto, ftp, irc, git, …). Custom schemes like vscode:// are stripped from href attributes 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:

  • github.com (README and PR "Files changed" view)
  • The VS Code GitHub Pull Requests extension (review file view)

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

  • README.md — badges link to https://azure.github.io/git-ape/open-settings.html and …/open-settings-insiders.html.
  • website/docs/getting-started/installation.md — same two badges added using Docusaurus' pathname:/// link prefix so the URL resolves to the static file at any baseUrl (works locally on / and in production on /git-ape/).
  • website/static/open-settings.html — new redirect → vscode://settings/chat.plugins.marketplaces.
  • website/static/open-settings-insiders.html — new redirect → vscode-insiders://settings/chat.plugins.marketplaces.

Verification

  • Built and ran Docusaurus locally; both badges render and click through to the redirect pages.
  • README badges link to https URLs that survive GitHub's markdown sanitizer.
  • Manual setup instructions remain on the redirect pages for users whose browsers cannot open vscode:// URIs.

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/...
@arnaudlh arnaudlh requested a review from dawright22 May 5, 2026 02:10
@arnaudlh arnaudlh self-assigned this May 5, 2026
@arnaudlh arnaudlh added the bug Something isn't working label May 5, 2026

@dawright22 dawright22 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

make sense.

@dawright22 dawright22 merged commit 63320b8 into Azure:main May 5, 2026
1 check passed
@arnaudlh arnaudlh added this to the v0.0.1 milestone May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants