Skip to content

Commit 52e9ca3

Browse files
committed
feat(shields.io): update image link format
- ref. https://shields.io/badges
1 parent 9ea447e commit 52e9ca3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shield.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ func generateShieldSrc(icon Icon) (string, error) {
3333
background = colorToHex(black)
3434
}
3535

36-
return fmt.Sprintf("https://img.shields.io/static/v1?style=for-the-badge&message=%s&color=%v&logo=%s&logoColor=%s&label=",
37-
url.QueryEscape(icon.Title),
38-
url.QueryEscape(background),
36+
return fmt.Sprintf("https://img.shields.io/badge/%s-%s?style=for-the-badge&logo=%s&logoColor=%s",
37+
url.PathEscape(icon.Title),
38+
url.PathEscape(background),
3939
url.QueryEscape(icon.Title),
4040
url.QueryEscape(foreground),
4141
), nil

0 commit comments

Comments
 (0)