diff --git a/src/components/Social.astro b/src/components/Social.astro index 974bcd0..ecf63de 100644 --- a/src/components/Social.astro +++ b/src/components/Social.astro @@ -1,19 +1,20 @@ --- -import config from "../../config.yaml"; +import { Boolify } from "../lib/boolify"; const { href, text, icon } = Astro.props; +const useIcons = Boolify(import.meta.env.PUBLIC_USEICONS); --- { - config.socialIcons && ( + useIcons && ( - + ) } { - !config.socialIcons && ( + !useIcons && ( - + {text} ) } diff --git a/src/layouts/Index.astro b/src/layouts/Index.astro index 6115231..9785596 100644 --- a/src/layouts/Index.astro +++ b/src/layouts/Index.astro @@ -1,5 +1,4 @@ --- -import config from "../../config.yaml"; import pb from "../lib/pb"; export const prerender = false const backgroundRec = await pb.collection('images').getFirstListItem('useAsBackground=true'); @@ -15,7 +14,7 @@ const background = await pb.files.getUrl(backgroundRec, backgroundRec.file); -