| 15 | |
| 16 | //Stat functions |
| 17 | async function fetchGithubSocialStats() { |
| 18 | const githubLink = config.social.find((c) => c.title === "Github").link; |
| 19 | const githubUsername = |
| 20 | githubLink.split("/")[githubLink.split("/").length - 1]; |
| 21 | const responseRaw = await fetch( |
| 22 | `https://api.github.com/users/${githubUsername}` |
| 23 | ); |
| 24 | const response = await responseRaw.json(); |
| 25 | followers = response.followers; |
| 26 | following = response.following; |
| 27 | } |
| 28 | |
| 29 | async function fetchLinkedInStats() { |
| 30 | const Linkedinkink = config.social.find((c) => c.title === "LinkedIn").link; |