Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/trueberryless-org/starlight-plugins-docs-components. Set of opinionated Starlight components used i starlight-plugins-docs-components.trueberryless.org
plugin starlight
Something went wrong. Try again.
637 B · 27 lines
Astro
at main
12345678910111213141516171819202122232425262728---import { Code } from "@astrojs/starlight/components";
const resourcesUrl = "https://gist.githubusercontent.com/trueberryless/7ed4110d6f4cf4d2517d98dfcc035705/raw";
interface Resource { name: string; description: string; url?: string;}
type Resources = Record<string, Resource[]>;
let resources: Resources | null = null;
// Fetch resources at build timetry { const response = await fetch(resourcesUrl); resources = (await response.json()) as Resources;} catch (error) { console.error("Failed to fetch resources:", error); resources = null;}---
<Code code={JSON.stringify(resources, null, 2)} lang="json" />