From 6ae6be6e725325d4ff9976124bb4181890f0eaca Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Wed, 8 Jan 2025 14:36:23 +0100 Subject: [PATCH] feat: use astro's Image component --- demo/astro.config.mjs | 6 +++++- pnpm-lock.yaml | 2 +- src/GithubStats.astro | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/demo/astro.config.mjs b/demo/astro.config.mjs index 4890b6f..79ad99e 100644 --- a/demo/astro.config.mjs +++ b/demo/astro.config.mjs @@ -1,4 +1,8 @@ import { defineConfig } from 'astro/config' // https://astro.build/config -export default defineConfig({}) +export default defineConfig({ + image: { + // domains: ['github-readme-stats.vercel.app'], + }, +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6afa33..3e53921 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,7 +9,7 @@ importers: .: dependencies: astro: - specifier: ^5 + specifier: '>=5.0.0' version: 5.1.1(@types/node@22.10.2)(jiti@2.4.2)(rollup@4.29.1)(typescript@5.7.2) devDependencies: '@eslint/js': diff --git a/src/GithubStats.astro b/src/GithubStats.astro index 51ee0bc..38a25a4 100644 --- a/src/GithubStats.astro +++ b/src/GithubStats.astro @@ -1,4 +1,5 @@ --- +import {Image} from 'astro:assets' export interface Props { username: string topLanguages?: boolean @@ -25,4 +26,4 @@ if (topLanguages) { alt = altText || alt --- -{alt} +{alt}