shieldcn-badges
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseshieldcn Badges
shieldcn 徽章
Badge URL format
徽章URL格式
https://shieldcn.dev/{provider}/{...params}.svg → SVG (default, for READMEs)
https://shieldcn.dev/{provider}/{...params}.png → PNG
https://shieldcn.dev/{provider}/{...params}.json → raw datahttps://shieldcn.dev/{provider}/{...params}.svg → SVG(默认格式,适用于README)
https://shieldcn.dev/{provider}/{...params}.png → PNG
https://shieldcn.dev/{provider}/{...params}.json → 原始数据Markdown pattern
Markdown使用格式
md
[](https://link)
<!-- or without link -->
md
[](https://link)
<!-- 或不带链接 -->
Providers & endpoints
服务商与端点
Package registries
包注册平台
| Provider | Endpoint | Example |
|---|---|---|
| npm version | | |
| npm version (tag) | | |
| npm downloads/wk | | |
| npm downloads/mo | | |
| npm downloads/yr | | |
| npm total downloads | | |
| npm license | | |
| npm types | | |
| npm dependents | | |
| npm scoped | | |
| PyPI version | | |
| PyPI downloads/mo | | |
| Crates.io version | | |
| Docker Hub pulls | | |
| JSR version | | |
| Bundlephobia minzip | | |
| Homebrew version | | |
| Maven version | | |
| Packagist version | | |
| RubyGems version | | |
| NuGet version | | |
| Pub.dev version | | |
| CocoaPods version | | |
| 服务商 | 端点 | 示例 |
|---|---|---|
| npm 版本 | | |
| npm 版本(指定标签) | | |
| npm 周下载量 | | |
| npm 月下载量 | | |
| npm 年下载量 | | |
| npm 总下载量 | | |
| npm 许可证 | | |
| npm 类型定义 | | |
| npm 依赖项目数 | | |
| npm 作用域包 | | |
| PyPI 版本 | | |
| PyPI 月下载量 | | |
| Crates.io 版本 | | |
| Docker Hub 拉取量 | | |
| JSR 版本 | | |
| Bundlephobia 压缩后大小 | | |
| Homebrew 版本 | | |
| Maven 版本 | | |
| Packagist 版本 | | |
| RubyGems 版本 | | |
| NuGet 版本 | | |
| Pub.dev 版本 | | |
| CocoaPods 版本 | | |
GitHub
GitHub
Both formats work: or
/github/{topic}/{owner}/{repo}/github/{owner}/{repo}/{topic}| Badge | Endpoint | Example |
|---|---|---|
| Stars | | |
| Forks | | |
| License | | |
| Release | | |
| CI status | | |
| Issues | | |
| Open PRs | | |
| Contributors | | |
| Last commit | | |
| Watchers | | |
| Downloads | | |
| Dependabot | | |
CI supports query params.
?workflow=name&branch=main两种格式均可: 或
/github/{topic}/{owner}/{repo}/github/{owner}/{repo}/{topic}| 徽章类型 | 端点 | 示例 |
|---|---|---|
| 星标数 | | |
| Fork数 | | |
| 许可证 | | |
| 版本发布 | | |
| CI 状态 | | |
| 问题数 | | |
| 打开的PR数 | | |
| 贡献者数 | | |
| 最后提交时间 | | |
| 关注者数 | | |
| 下载量 | | |
| Dependabot 状态 | | |
CI支持查询参数。
?workflow=name&branch=mainSocial
社交平台
| Provider | Endpoint | Example |
|---|---|---|
| Discord online | | |
| Discord by invite | | |
| Reddit subscribers | | |
| Bluesky followers | | |
| YouTube subs | | |
| Mastodon followers | | |
| Hacker News karma | | |
| 服务商 | 端点 | 示例 |
|---|---|---|
| Discord 在线人数 | | |
| Discord 邀请链接成员数 | | |
| Reddit 订阅者数 | | |
| Bluesky 关注者数 | | |
| YouTube 订阅数 | | |
| Mastodon 关注者数 | | |
| Hacker News 积分 | | |
Code quality
代码质量
| Provider | Endpoint | Example |
|---|---|---|
| Codecov | | |
| VS Code installs | | |
| WakaTime | | |
| 服务商 | 端点 | 示例 |
|---|---|---|
| Codecov | | |
| VS Code 安装量 | | |
| WakaTime | | |
Custom badges
自定义徽章
| Type | Endpoint | Example |
|---|---|---|
| Static | | |
| Dynamic JSON | | Fetch any JSON API |
| HTTPS endpoint | | Proxy any JSON endpoint |
| 类型 | 端点 | 示例 |
|---|---|---|
| 静态徽章 | | |
| 动态JSON徽章 | | 调用任意JSON API |
| HTTPS端点代理 | | 代理任意JSON端点 |
Query parameters
查询参数
Append to any badge URL as .
?key=value&key2=value2| Param | Values | Default | Notes |
|---|---|---|---|
| | | shadcn Button variant |
| | | Badge size |
| | | Color mode |
| | | Two-tone label/value split |
| SimpleIcons slug, | auto | Icon source |
| hex (no | auto | Icon color |
| string | auto | Override label text |
| hex (no | — | Background color |
| hex (no | — | Label side bg (split mode) |
| | — | Color theme |
| | | Font family |
| | auto for CI | Show status indicator dot |
以的形式追加到任意徽章URL后。
?key=value&key2=value2| 参数 | 可选值 | 默认值 | 说明 |
|---|---|---|---|
| | | shadcn按钮样式变体 |
| | | 徽章尺寸 |
| | | 颜色模式 |
| | | 标签/值分色显示 |
| SimpleIcons 标识名, | 自动匹配 | 图标来源 |
| 十六进制颜色(不带 | 自动匹配 | 图标颜色 |
| 字符串 | 自动匹配 | 覆盖标签文本 |
| 十六进制颜色(不带 | — | 背景颜色 |
| 十六进制颜色(不带 | — | 标签侧背景色(分色模式下) |
| | — | 颜色主题 |
| | | 字体族 |
| | CI类徽章自动显示 | 显示状态指示点 |
Common recipes
常见用法示例
Typical README badge row
典型README徽章行
md
<p align="center">
<a href="https://www.npmjs.com/package/{pkg}"><img src="https://shieldcn.dev/npm/{pkg}.svg" alt="npm" /></a>
<a href="https://github.com/{owner}/{repo}/stargazers"><img src="https://shieldcn.dev/github/stars/{owner}/{repo}.svg" alt="stars" /></a>
<a href="https://github.com/{owner}/{repo}"><img src="https://shieldcn.dev/github/license/{owner}/{repo}.svg" alt="license" /></a>
<a href="https://github.com/{owner}/{repo}/actions"><img src="https://shieldcn.dev/github/ci/{owner}/{repo}.svg" alt="CI" /></a>
</p>md
<p align="center">
<a href="https://www.npmjs.com/package/{pkg}"><img src="https://shieldcn.dev/npm/{pkg}.svg" alt="npm" /></a>
<a href="https://github.com/{owner}/{repo}/stargazers"><img src="https://shieldcn.dev/github/stars/{owner}/{repo}.svg" alt="stars" /></a>
<a href="https://github.com/{owner}/{repo}"><img src="https://shieldcn.dev/github/license/{owner}/{repo}.svg" alt="license" /></a>
<a href="https://github.com/{owner}/{repo}/actions"><img src="https://shieldcn.dev/github/ci/{owner}/{repo}.svg" alt="CI" /></a>
</p>Secondary variant (lighter)
次要变体(浅色风格)
md
md
Branded variant (brand-colored bg)
品牌变体(品牌色背景)
md
md
Split badge (two-tone)
分色徽章(双色显示)
md
md
Light mode
浅色模式
md
md
Custom icon
自定义图标
md

md

No icon
无图标
md
md
Rules
使用规则
- Always use for markdown images (best quality, smallest size)
.svg - Use wrapper to make badges clickable links
<a> - Use to center badge rows in GitHub READMEs
<p align="center"> - Replace ,
{owner},{repo}with actual values — never leave placeholders{package} - Default variant () works on both light and dark GitHub themes
default - Icons are auto-resolved per provider — only set to override
?logo= - For npm scoped packages, use the full scope:
/npm/v/@scope/package - Prefer for subtle badge rows
variant=secondary - Keep badge rows to 3–6 badges for readability
- Link each badge to its relevant page (npm registry, GitHub stars page, etc.)
- 始终为Markdown图片使用格式(质量最佳,体积最小)
.svg - 使用标签包裹徽章,使其成为可点击链接
<a> - 在GitHub README中使用来居中徽章行
<p align="center"> - 将、
{owner}、{repo}替换为实际值——切勿保留占位符{package} - 默认变体()在GitHub浅色和深色主题下均适用
default - 图标会根据服务商自动匹配——仅在需要覆盖时设置参数
?logo= - 对于npm作用域包,使用完整作用域路径:
/npm/v/@scope/package - 推荐使用来创建更低调的徽章行
variant=secondary - 徽章行保持3-6个徽章以保证可读性
- 将每个徽章链接到对应的相关页面(npm registry、GitHub星标页面等)
Docs
文档
Full documentation: https://shieldcn.dev/docs
API reference: https://shieldcn.dev/docs/api-reference
Badge builder: https://shieldcn.dev (interactive UI)