diff --git a/src/components/HeadSEO.astro b/src/components/HeadSEO.astro index 4a6ced3..fe37675 100644 --- a/src/components/HeadSEO.astro +++ b/src/components/HeadSEO.astro @@ -1,5 +1,17 @@ --- +import { getImage } from '@astrojs/image'; import { SITE, OPEN_GRAPH } from '../config'; + +const defaultImage = OPEN_GRAPH.image.src + ? ( + await getImage({ + src: OPEN_GRAPH.image.src, + alt: OPEN_GRAPH.image.alt, + width: 640, + height: 320, + }) + ).src + : ''; --- @@ -13,7 +25,7 @@ import { SITE, OPEN_GRAPH } from '../config'; - + @@ -22,7 +34,7 @@ import { SITE, OPEN_GRAPH } from '../config'; - + diff --git a/src/config.ts b/src/config.ts index 5e43cf1..e204ed4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -7,7 +7,7 @@ export const SITE = { export const OPEN_GRAPH = { image: { - src: './src/assets/images/og-image.png', + src: '../src/assets/images/og-image.png', alt: 'Odkazy text s tlačítkami', }, twitter: 'oliminator34', @@ -19,6 +19,7 @@ export const BUTTONS = [ background: 'bg-youtube hover:bg-youtube/80', href: '/', }, + /* { name: 'Instagram', background: 'bg-instagram hover:bg-instagram/80', @@ -48,5 +49,5 @@ export const BUTTONS = [ name: 'Twitter', background: 'bg-twitter hover:bg-twitter/80', href: '/', - }, + },*/ ];