Files
github-readme-stats/generator/frontend/public/github-readme-stats-alternative.html
T

215 lines
10 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>github-readme-stats alternative: a maintained stats card for your profile README</title>
<meta name="description"
content="anuraghazra/github-readme-stats is marked no longer maintained. gh-stats is a maintained, MIT-licensed stats card you can drop into your GitHub profile README by changing the domain in your existing URL, or self-host on your own API quota."/>
<link rel="canonical" href="https://gh-stats.com/github-readme-stats-alternative.html"/>
<link rel="icon" type="image/svg+xml" href="/favicon.svg"/>
<meta property="og:type" content="article"/>
<meta property="og:site_name" content="gh-stats"/>
<meta property="og:url" content="https://gh-stats.com/github-readme-stats-alternative.html"/>
<meta property="og:title" content="github-readme-stats alternative: a maintained stats card"/>
<meta property="og:description"
content="The card most profile READMEs use is marked no longer maintained. Here is how to move, with the URL shapes you already have."/>
<meta property="og:image" content="https://gh-stats.com/og.png"/>
<meta name="twitter:card" content="summary_large_image"/>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400..700&family=Instrument+Serif&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"/>
<script type="module">
// Same GA4 stream as the SPA (index.html), so this page's traffic and its
// referrers land in the existing property instead of going unmeasured.
import {initializeApp} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-app.js";
import {getAnalytics} from "https://www.gstatic.com/firebasejs/12.13.0/firebase-analytics.js";
getAnalytics(initializeApp({
apiKey: "AIzaSyCy2pUW8Geo0Aagq9mTYKlfCpa9GUIXpy8",
authDomain: "gh-stats-284de.firebaseapp.com",
projectId: "gh-stats-284de",
storageBucket: "gh-stats-284de.firebasestorage.app",
messagingSenderId: "723662839762",
appId: "1:723662839762:web:4ba5337f6489ea67dc320b",
measurementId: "G-228GR89RYX"
}));
</script>
<style>
:root{
--bg:#f9fafb; --card:#ffffff; --line:#e5e7eb;
--ink:#1f2937; --muted:#6b7280; --faint:#9ca3af; --accent:#0969da;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);
font-family:'DM Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;
line-height:1.65}
main{max-width:760px;margin:0 auto;padding:56px 24px 96px}
h1{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
font-size:2.6rem;line-height:1.15;letter-spacing:-.01em;margin:0 0 16px}
h2{font-family:'Instrument Serif',Georgia,serif;font-weight:400;
font-size:1.65rem;margin:48px 0 12px;letter-spacing:-.01em}
p{margin:0 0 16px}
.lede{font-size:1.08rem;color:var(--muted);margin-bottom:32px}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
code,pre{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:.86rem}
pre{background:var(--card);border:1px solid var(--line);border-radius:10px;
padding:14px 16px;overflow-x:auto;margin:0 0 16px}
code:not(pre code){background:#f3f4f6;border-radius:5px;padding:.12em .38em;font-size:.85em}
.tablewrap{overflow-x:auto;margin:0 0 16px}
table{border-collapse:collapse;width:100%;font-size:.86rem;background:var(--card);
border:1px solid var(--line);border-radius:10px}
th,td{text-align:left;padding:10px 14px;border-bottom:1px solid var(--line);
vertical-align:top}
th{font-weight:600;color:var(--muted);font-size:.78rem;text-transform:uppercase;
letter-spacing:.04em}
tr:last-child td{border-bottom:none}
td code{white-space:nowrap}
figure{margin:0 0 28px}
figure img{width:100%;max-width:400px;display:block;border-radius:12px}
figcaption{color:var(--faint);font-size:.8rem;margin-top:8px}
.clip{position:relative;max-width:340px;max-height:400px;overflow:hidden;
border-radius:12px}
.clip img{width:100%;display:block;border-radius:12px}
.clip::after{content:"";position:absolute;left:0;right:0;bottom:0;height:72px;
background:linear-gradient(to top,var(--bg),transparent)}
.cta{display:inline-block;background:var(--ink);color:#fff;border-radius:9px;
padding:11px 20px;font-weight:600;font-size:.92rem;margin:8px 0 0}
.cta:hover{text-decoration:none;opacity:.9}
.note{border-left:3px solid var(--line);padding:2px 0 2px 16px;color:var(--muted);
font-size:.92rem;margin:0 0 16px}
footer{border-top:1px solid var(--line);margin-top:64px;padding-top:20px;
color:var(--faint);font-size:.82rem}
@media (max-width:640px){h1{font-size:2.05rem}main{padding:36px 20px 72px}}
</style>
</head>
<body>
<main>
<h1>A maintained alternative to github-readme-stats</h1>
<p class="lede">
<a href="https://github.com/anuraghazra/github-readme-stats">anuraghazra/github-readme-stats</a>
is the stats card most GitHub profile READMEs use, and it earned that place.
Its README now opens with a caution notice saying the repository is no longer
maintained. If you are looking for somewhere to move, this page shows the swap.
</p>
<figure>
<img src="https://gh-stats.com/?username=ShayManor" alt="A gh-stats developer profile card showing score, commits, pull requests, stars and role tags."/>
<figcaption>The profile card: score out of 100, headline counts, and role tags earned from your repositories.</figcaption>
</figure>
<h2>Change the domain, keep the URL</h2>
<p>
The common URL shapes work here with only the domain changed, so migrating is
an edit to one line of markdown.
</p>
<div class="tablewrap">
<table>
<tr><th>Your current URL</th><th>Change it to</th></tr>
<tr><td><code>github-readme-stats.vercel.app/api?username=U</code></td>
<td><code>gh-stats.com/api?username=U</code></td></tr>
<tr><td><code>github-readme-stats.vercel.app/api/top-langs?username=U</code></td>
<td><code>gh-stats.com/api/top-langs?username=U</code></td></tr>
<tr><td><code>github-readme-stats-sigma-five.vercel.app/api?username=U</code> (returns 402)</td>
<td><code>gh-stats.com/api?username=U</code></td></tr>
<tr><td><code>github-readme-stats-eight-theta.vercel.app/api?username=U</code> (returns 402)</td>
<td><code>gh-stats.com/api?username=U</code></td></tr>
<tr><td><code>github-readme-stats-eight-theta.vercel.app/api/top-langs?username=U</code> (returns 402)</td>
<td><code>gh-stats.com/api/top-langs?username=U</code></td></tr>
<tr><td><code>github-readme-streak-stats.herokuapp.com/?user=U</code></td>
<td><code>gh-stats.com/api/streak/U</code></td></tr>
</table>
</div>
<p>Nothing else in your README changes.</p>
<p class="note">
<code>theme=</code> is honoured on the composite card (<code>/api/&lt;user&gt;</code>).
On the compatibility and single-widget URLs above it is currently ignored and the
default theme is served.
</p>
<h2>Or replace several badges with one card</h2>
<p>
Most profile READMEs stack a stats badge, a streak badge, a languages badge and a
trophy row, each one a separate request. The composite card covers all of it in a
single image:
</p>
<pre><code>![stats](https://gh-stats.com/api/YOUR_USERNAME)</code></pre>
<figure>
<div class="clip">
<img src="https://gh-stats.com/api/ShayManor" alt="The full gh-stats composite card: profile score, impact timeline, collaborators, languages, streaks and achievements."/>
</div>
<figcaption>The composite card, cropped. It stacks profile, timeline, collaborators, languages, streaks and achievements.</figcaption>
</figure>
<p>
No signup is required to try it. Type a username on the
<a href="https://gh-stats.com/">home page</a> and the real card renders immediately.
Signing in with GitHub proves you own the username and unlocks the editor for
themes, widget order and custom tags.
</p>
<a class="cta" href="https://gh-stats.com/">Try it on your username</a>
<h2>What you should know before switching</h2>
<p>
The project's own successor is
<a href="https://github.com/stats-organization/github-stats-extended">GitHub Stats Extended</a>,
named in that caution notice. It is a fork that keeps the original's shape, so pick
it if what you want is the same card with the same options.
</p>
<p>
gh-stats is a different design: one card that summarises the whole profile, rather
than a set of separate badges. It is MIT licensed, and you can
<a href="https://github.com/ShayManor/github-readme-stats">self-host it</a> with
<code>docker compose up</code> on your own GitHub API quota if you would rather not
depend on someone else's instance.
</p>
<p>
Only public GitHub activity is counted. Private repositories, private commit counts
and contributions to org-restricted repositories are never visible to the fetcher.
</p>
<h2>Common questions</h2>
<p>
<strong>Is github-readme-stats actually dead?</strong> The repository is not archived
and the hosted instance still serves cards. The maintainer marked it no longer
maintained in the README, which is a statement about future work rather than an
outage.
</p>
<p>
<strong>Why do stats cards return an error or a blank image?</strong> A shared
instance runs on one GitHub API quota, so a popular deployment hits rate limits and
serves errors to everyone behind it. Self-hosting puts you on your own quota and
removes that failure mode.
</p>
<p>
<strong>Do I have to change my README again later?</strong> No. The image URL is
stable, so themes, tags and widget order can change in the editor without touching
the markdown.
</p>
<footer>
<a href="https://gh-stats.com/">gh-stats.com</a> &middot;
<a href="https://github.com/ShayManor/github-readme-stats">source on GitHub</a> &middot;
MIT licensed
</footer>
</main>
</body>
</html>