mirror of
https://github.com/xHyroM/links.git
synced 2024-11-22 07:31:06 +01:00
fix: og image
This commit is contained in:
parent
33b1a84fd9
commit
13ac49f60d
2 changed files with 17 additions and 4 deletions
|
@ -1,5 +1,17 @@
|
||||||
---
|
---
|
||||||
|
import { getImage } from '@astrojs/image';
|
||||||
import { SITE, OPEN_GRAPH } from '../config';
|
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
|
||||||
|
: '';
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Primary Meta Tags -->
|
<!-- Primary Meta Tags -->
|
||||||
|
@ -13,7 +25,7 @@ import { SITE, OPEN_GRAPH } from '../config';
|
||||||
<meta property="og:site_name" content={SITE.title} />
|
<meta property="og:site_name" content={SITE.title} />
|
||||||
<meta property="og:title" content={SITE.title} />
|
<meta property="og:title" content={SITE.title} />
|
||||||
<meta property="og:description" content={SITE.description} />
|
<meta property="og:description" content={SITE.description} />
|
||||||
<meta property="og:image" content={OPEN_GRAPH.image.src} />
|
<meta property="og:image" content={defaultImage} />
|
||||||
<meta property="og:image:alt" content={OPEN_GRAPH.image.alt} />
|
<meta property="og:image:alt" content={OPEN_GRAPH.image.alt} />
|
||||||
|
|
||||||
<!-- Twitter -->
|
<!-- Twitter -->
|
||||||
|
@ -22,7 +34,7 @@ import { SITE, OPEN_GRAPH } from '../config';
|
||||||
<meta property="twitter:url" content={SITE.url} />
|
<meta property="twitter:url" content={SITE.url} />
|
||||||
<meta property="twitter:title" content={SITE.title} />
|
<meta property="twitter:title" content={SITE.title} />
|
||||||
<meta property="twitter:description" content={SITE.description} />
|
<meta property="twitter:description" content={SITE.description} />
|
||||||
<meta property="twitter:image" content={OPEN_GRAPH.image.src} />
|
<meta property="twitter:image" content={defaultImage} />
|
||||||
<meta name="twitter:image:alt" content={OPEN_GRAPH.image.alt} />
|
<meta name="twitter:image:alt" content={OPEN_GRAPH.image.alt} />
|
||||||
|
|
||||||
<meta name="theme-color" content={SITE.themeColor} />
|
<meta name="theme-color" content={SITE.themeColor} />
|
||||||
|
|
|
@ -7,7 +7,7 @@ export const SITE = {
|
||||||
|
|
||||||
export const OPEN_GRAPH = {
|
export const OPEN_GRAPH = {
|
||||||
image: {
|
image: {
|
||||||
src: './src/assets/images/og-image.png',
|
src: '../src/assets/images/og-image.png',
|
||||||
alt: 'Odkazy text s tlačítkami',
|
alt: 'Odkazy text s tlačítkami',
|
||||||
},
|
},
|
||||||
twitter: 'oliminator34',
|
twitter: 'oliminator34',
|
||||||
|
@ -19,6 +19,7 @@ export const BUTTONS = [
|
||||||
background: 'bg-youtube hover:bg-youtube/80',
|
background: 'bg-youtube hover:bg-youtube/80',
|
||||||
href: '/',
|
href: '/',
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
name: 'Instagram',
|
name: 'Instagram',
|
||||||
background: 'bg-instagram hover:bg-instagram/80',
|
background: 'bg-instagram hover:bg-instagram/80',
|
||||||
|
@ -48,5 +49,5 @@ export const BUTTONS = [
|
||||||
name: 'Twitter',
|
name: 'Twitter',
|
||||||
background: 'bg-twitter hover:bg-twitter/80',
|
background: 'bg-twitter hover:bg-twitter/80',
|
||||||
href: '/',
|
href: '/',
|
||||||
},
|
},*/
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue