feat: use astro's Image component
This commit is contained in:
parent
7c4a4c979b
commit
6ae6be6e72
3 changed files with 8 additions and 3 deletions
|
@ -1,4 +1,8 @@
|
||||||
import { defineConfig } from 'astro/config'
|
import { defineConfig } from 'astro/config'
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({})
|
export default defineConfig({
|
||||||
|
image: {
|
||||||
|
// domains: ['github-readme-stats.vercel.app'],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
|
@ -9,7 +9,7 @@ importers:
|
||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
astro:
|
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)
|
version: 5.1.1(@types/node@22.10.2)(jiti@2.4.2)(rollup@4.29.1)(typescript@5.7.2)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@eslint/js':
|
'@eslint/js':
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
import {Image} from 'astro:assets'
|
||||||
export interface Props {
|
export interface Props {
|
||||||
username: string
|
username: string
|
||||||
topLanguages?: boolean
|
topLanguages?: boolean
|
||||||
|
@ -25,4 +26,4 @@ if (topLanguages) {
|
||||||
alt = altText || alt
|
alt = altText || alt
|
||||||
---
|
---
|
||||||
|
|
||||||
<img src={url} alt={alt} />
|
<Image inferSize={true} src={url} alt={alt} />
|
||||||
|
|
Loading…
Reference in a new issue