diff --git a/src/components/Image.astro b/src/components/Image.astro index a36a4ef..b95e997 100644 --- a/src/components/Image.astro +++ b/src/components/Image.astro @@ -1,5 +1,4 @@ --- -import { Picture as AstroPic } from "astro:assets"; const { src, alt, nsfw } = Astro.props; --- diff --git a/src/components/IndexSidebar.astro b/src/components/IndexSidebar.astro index a15e21e..cb84869 100644 --- a/src/components/IndexSidebar.astro +++ b/src/components/IndexSidebar.astro @@ -1,40 +1,44 @@ --- import { Image } from "astro:assets"; -import config from "../../config.yaml"; import Social from "./Social.astro"; -const {} = Astro.props; +import pb from "../lib/pb"; + +const avatarRec = await pb + .collection("images") + .getFirstListItem("useAsAvatar=true"); + +const icon = await pb.files.getUrl(avatarRec, avatarRec.file); +const socials = await pb.collection("socials").getFullList(); + +const config = { + icon, + socials, + title: import.meta.env.PUBLIC_TITLE, + description: import.meta.env.PUBLIC_DESCRIPTION, +}; ---