--- export const prerender = false; import PageLayout from "@/layouts/Base.astro"; import { createDarkmatterHighlighter, THEME_NAME, } from "../../scripts/shiki-setup.mjs"; const meta = { title: "/git", description: "Access the open source repos I'm working on", }; const highlighter = createDarkmatterHighlighter(); const codeHtml = highlighter.codeToHtml("ssh git.stevedylan.dev", { lang: "bash", theme: THEME_NAME, }); // Fetch repos from my self hosted git site let repos: any[] = []; let error: string | null = null; try { const res = await fetch("https://git.stevedylan.dev/api/repos"); if (res.ok) { const data = await res.json(); repos = (data.repos ?? []).sort( (a: any, b: any) => new Date(b.last_commit).getTime() - new Date(a.last_commit).getTime(), ); } else { error = `API returned ${res.status}`; } } catch (e) { error = e instanceof Error ? e.message : "Failed to reach git API"; } const dateFormatter = new Intl.DateTimeFormat("en-US", { year: "numeric", month: "short", day: "numeric", }); ---

/git

You can browse my open source repos on git.stevedylan.dev. View them on the web, or visit over SSH:

You can also checkout my GitHub for other work and contributions.

{error ? (

Could not load repos: {error}

) : repos.length === 0 ? (

no repos yet

) : ( )}