diff --git a/src/GithubStats.astro b/src/GithubStats.astro
index 2fb7292..2a9858f 100644
--- a/src/GithubStats.astro
+++ b/src/GithubStats.astro
@@ -4,18 +4,25 @@ export interface Props {
topLanguages?: boolean;
repo?: string;
showIcons?: boolean;
+ altText?: string;
}
-const { username, repo, topLanguages, showIcons } = Astro.props;
+const { username, repo, topLanguages, showIcons, altText } = Astro.props;
const baseUrl = 'https://github-readme-stats.vercel.app/api/';
let url = `${baseUrl}?username=${username}&show_icons=${!!showIcons}`;
+let alt = `GitHub stats for account: ${username}`;
+
if (repo) {
url = `${baseUrl}/pin/?username=${username}&repo=${repo}`;
+ alt = `GitHub stats for repository: ${username}/${repo}`;
}
if (topLanguages) {
url = `${baseUrl}top-langs?username=${username}`;
+ alt = `GitHub top languages for account: ${username}`;
}
+
+alt = altText || alt;
---
-
+