--- import Layout from "../layouts/Layout.astro"; import Navbar from "../components/widgets/Navbar.astro"; import Container from "../components/atoms/Container.astro"; interface Project { name: string; link: string; desc: string; stats?: { forks: number; stars: number; }; } const projects: Project[] = [ { name: "HyLib", link: "https://github.com/xHyroM/HyLib", desc: "Source code for HyLib, a paper plugin and powerful library.", }, { name: "HyChat", link: "https://github.com/xHyroM/HyChat", desc: "Source code for HyChat, a paper plugin.", }, { name: "HyX", link: "https://github.com/xHyroM/HyX", desc: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque, quaerat.", }, { name: "Mashe", link: "https://github.com/xHyroM/mashe", desc: "Simple, fast, and easy to use Event Handling for Java.", }, { name: "Mumblum", link: "https://github.com/xHyroM/mumblum", desc: "Mumblum is a simple, modern discord bot in JDA.", }, { name: "setup-bun", link: "https://github.com/xHyroM/setup-bun", desc: "Set up your GitHub Actions workflow with a specific version of Bun.", }, { name: "Roles Bot", link: "https://github.com/xHyroM/roles-bot", desc: 'Discord bot for "button" roles, using Cloudflare Workers.', }, { name: "Bun Discord Bot", link: "https://github.com/xHyroM/bun-discord-bot", desc: "Official serverless discord bot for bun discord server.", }, { name: "hykord", link: "https://github.com/xHyroM/hykord", desc: "My @discord client modification.", }, { name: "frog", link: "https://github.com/xHyroM/frog", desc: "Frog is an extremely simple language based on the monkey language.", }, ]; for (const project of projects) { const repository = await ( await fetch(`https://api.github.com/repos/${project.link.slice(19)}`, { headers: { Authorization: `Bearer ${import.meta.env.GITHUB_ACCESS_TOKEN}`, }, }) ).json(); project.stats = { forks: repository.forks, stars: repository.stargazers_count, }; } --- ({ "@type": "ListItem", position: i + 1, name: project.name, url: project.link, })), }} >

Projects

{ projects.map((project) => (

{project.name}

{project.stats!.stars}

{" "}

{project.stats!.forks}

{project.desc}

)) }