feat(growth): link the card footer back, copy-on-open, two SEO pages

- composite footer links to gh-stats.com (?ref=card)
- result screen: 'Copy & open your README' copies the snippet
- new pages: github-top-languages-card, github-profile-readme (+ sitemap)
- README snippets wrap the card in a link

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shay
2026-11-27 22:45:30 -08:00
co-authored by Claude Opus 5.5
parent 74a8146779
commit 3653ef66a5
6 changed files with 392 additions and 3 deletions
@@ -0,0 +1,189 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>How to create a GitHub profile README (and add a stats card)</title>
<meta name="description"
content="Create the special repository that GitHub shows on your profile, then add a live stats card with one line of markdown. Five steps, about two minutes, no signup."/>
<link rel="canonical" href="https://gh-stats.com/github-profile-readme.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-profile-readme.html"/>
<meta property="og:title" content="How to create a GitHub profile README"/>
<meta property="og:description"
content="The special repository, the one setting that trips people up, and a stats card in one line."/>
<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>How to create a GitHub profile README</h1>
<p class="lede">
A profile README is the block of text and images at the top of your GitHub profile
page. GitHub builds it from one specific repository, so setting it up is a matter of
creating that repository and writing a README in it.
</p>
<h2>What GitHub needs</h2>
<p>GitHub shows a README on your profile when all four of these hold:</p>
<div class="tablewrap">
<table>
<tr><th>Requirement</th><th>Example for the username <code>octocat</code></th></tr>
<tr><td>A repository named exactly like your username</td><td><code>octocat/octocat</code></td></tr>
<tr><td>The repository is public</td><td>Visibility: Public</td></tr>
<tr><td>A file named <code>README.md</code> in its root</td><td><code>octocat/octocat/README.md</code></td></tr>
<tr><td>The file is not empty</td><td>Any text at all</td></tr>
</table>
</div>
<h2>Create it in five steps</h2>
<p>
1. Open <a href="https://github.com/new">github.com/new</a>.<br/>
2. Under Repository name, type your username exactly. GitHub confirms with a
note that this is a special repository.<br/>
3. Select <strong>Public</strong>.<br/>
4. Turn on <strong>Add a README file</strong>.<br/>
5. Click <strong>Create repository</strong>, then <strong>Edit README</strong>.
</p>
<p>
Save any text and your profile page shows it. The pre-filled template is fine to
keep, replace, or delete.
</p>
<p class="note">
If you made a public repository with your username before July 2020, GitHub does
not show it automatically. Open the repository and click <strong>Share to
profile</strong>.
</p>
<h2>Add a stats card</h2>
<p>
Paste this line into the README, replace the username in both places, and commit:
</p>
<pre><code>[![GitHub stats](https://gh-stats.com/api/YOUR_USERNAME)](https://gh-stats.com)</code></pre>
<p>
It renders one card with a score out of 100, your contribution timeline, top
collaborators, language breakdown and commit streaks, and it updates on its own.
The first request for a new username queues a build, so give it a minute.
</p>
<figure>
<div class="clip">
<img src="https://gh-stats.com/api/ShayManor" alt="A gh-stats card: profile score, impact timeline, collaborators, languages, streaks and achievements."/>
</div>
<figcaption>A stats card in a profile README, cropped.</figcaption>
</figure>
<a class="cta" href="https://gh-stats.com/">Preview the card for your username</a>
<p style="margin-top:24px">
Want only one part? The
<a href="https://gh-stats.com/github-top-languages-card.html">top languages card</a>
works the same way. Already using github-readme-stats? See the
<a href="https://gh-stats.com/github-readme-stats-alternative.html">migration guide</a>.
</p>
<h2>Common questions</h2>
<p>
<strong>I created the repository but my profile shows nothing.</strong> Check the
four requirements above. The usual cause is a private repository or a name that does
not match the username exactly.
</p>
<p>
<strong>Can I edit it later?</strong> Yes. Every commit to that <code>README.md</code>
updates your profile page.
</p>
<p>
<strong>Does the card need a token or an account?</strong> No. It reads public
GitHub activity only, and there is nothing to sign up for.
</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>
@@ -0,0 +1,188 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>GitHub top languages card for your profile README</title>
<meta name="description"
content="Add a most-used-languages card to your GitHub profile README with one line of markdown. Hide languages you do not want counted, pick a theme, no signup. Drop-in for github-readme-stats top-langs URLs."/>
<link rel="canonical" href="https://gh-stats.com/github-top-languages-card.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-top-languages-card.html"/>
<meta property="og:title" content="GitHub top languages card for your profile README"/>
<meta property="og:description"
content="One line of markdown, a theme, and a list of languages to hide."/>
<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 top languages card for your GitHub profile README</h1>
<p class="lede">
The languages card shows which languages your public repositories are written in,
as a donut and a ranked legend. It is one image, served from one URL, and it stays
current without a GitHub Action or a token.
</p>
<figure>
<img src="https://gh-stats.com/api/ShayManor?widgets=languages" alt="A gh-stats top languages card: a donut chart with Python, Go, Jupyter Notebook, JavaScript and TypeScript, each with a percentage."/>
<figcaption>The languages card for one profile.</figcaption>
</figure>
<h2>Add it to your README</h2>
<p>Paste this into your profile README and replace the username:</p>
<pre><code>![Top languages](https://gh-stats.com/api/YOUR_USERNAME?widgets=languages)</code></pre>
<p>
The first request for a new username queues a build, so the card can take a minute
to fill in. After that it is served from cache and refreshed in the background.
</p>
<a class="cta" href="https://gh-stats.com/">Preview it on your username</a>
<h2>Hide languages and pick a theme</h2>
<p>
Notebooks, generated HTML and vendored code often dominate a languages chart.
List what to leave out in <code>hide</code>, comma-separated, and choose a look
with <code>theme</code>:
</p>
<pre><code>![Top languages](https://gh-stats.com/api/YOUR_USERNAME?widgets=languages&amp;hide=Jupyter%20Notebook,HTML&amp;theme=nord)</code></pre>
<div class="tablewrap">
<table>
<tr><th>Parameter</th><th>What it does</th></tr>
<tr><td><code>hide</code></td>
<td>Languages to exclude, comma-separated. Use <code>%20</code> for spaces.</td></tr>
<tr><td><code>theme</code></td>
<td><code>clean</code>, <code>midnight</code>, <code>nord</code>, <code>onyx</code> or <code>paper</code>.</td></tr>
</table>
</div>
<h2>Coming from github-readme-stats</h2>
<p>
If your README already has a <code>top-langs</code> card from
<code>github-readme-stats.vercel.app</code>, change only the domain:
</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/top-langs?username=U</code></td>
<td><code>gh-stats.com/api/top-langs?username=U</code></td></tr>
</table>
</div>
<p class="note">
The compatibility URL ignores the original styling parameters (<code>layout</code>,
<code>langs_count</code>, colours) and serves the default card. Use the
<code>?widgets=languages</code> form above for <code>hide</code> and <code>theme</code>.
</p>
<p>
The full migration guide covers the stats and streak cards too:
<a href="https://gh-stats.com/github-readme-stats-alternative.html">github-readme-stats alternative</a>.
</p>
<h2>Common questions</h2>
<p>
<strong>How are percentages worked out?</strong> From the byte counts GitHub reports
for each public repository you authored, summed across those repositories. Forks are
left out. A large repository in one language weighs more than several small ones.
</p>
<p>
<strong>Are private repositories counted?</strong> No. Only public activity is
visible to the fetcher.
</p>
<p>
<strong>Can I show it alongside other stats?</strong> Yes. Drop the
<code>?widgets=languages</code> part and the same URL serves the full profile card:
score, contribution timeline, collaborators, languages and streaks in one image.
</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>
+10
View File
@@ -10,4 +10,14 @@
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://gh-stats.com/github-top-languages-card.html</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://gh-stats.com/github-profile-readme.html</loc>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
@@ -156,7 +156,7 @@ export function ResultScreen({ username, generating, generatedSvg, generateError
</div>
<p className="mt-3 text-xs text-gray-500">
Paste it into <code className="text-gray-600">{username}/{username}</code>, the repo GitHub shows on your profile.{' '}
<a href={editReadmeUrl} target="_blank" rel="noopener noreferrer" className="text-gray-700 underline hover:text-gray-900">Open your README</a>
<a href={editReadmeUrl} onClick={copy} target="_blank" rel="noopener noreferrer" className="text-gray-700 underline hover:text-gray-900">Copy &amp; open your README</a>
{' \u00b7 '}
<a href={createRepoUrl} target="_blank" rel="noopener noreferrer" className="text-gray-700 underline hover:text-gray-900">Create the repo</a>
</p>
+2
View File
@@ -125,7 +125,9 @@ def compose_widget(
fill="none" stroke="{t["card_border"]}" stroke-width="1"/>
{header}
{embedded}
<a href="https://gh-stats.com/?ref=card" xlink:href="https://gh-stats.com/?ref=card" target="_top">
<text x="{total_w // 2}" y="{total_h - 8}" text-anchor="middle"
font-family="-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif"
font-size="10" fill="{t["text_secondary"]}" opacity="0.75">Generated with gh-stats.com</text>
</a>
</svg>'''