mirror of
https://github.com/xHyroM/links.git
synced 2024-11-10 02:28:06 +01:00
fix: og image
This commit is contained in:
parent
13ac49f60d
commit
585d88db76
4 changed files with 5 additions and 16 deletions
|
@ -1,17 +1,6 @@
|
|||
---
|
||||
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
|
||||
: '';
|
||||
---
|
||||
|
||||
<!-- Primary Meta Tags -->
|
||||
|
@ -25,7 +14,7 @@ const defaultImage = OPEN_GRAPH.image.src
|
|||
<meta property="og:site_name" content={SITE.title} />
|
||||
<meta property="og:title" content={SITE.title} />
|
||||
<meta property="og:description" content={SITE.description} />
|
||||
<meta property="og:image" content={defaultImage} />
|
||||
<meta property="og:image" content={OPEN_GRAPH.image.src} />
|
||||
<meta property="og:image:alt" content={OPEN_GRAPH.image.alt} />
|
||||
|
||||
<!-- Twitter -->
|
||||
|
@ -34,7 +23,7 @@ const defaultImage = OPEN_GRAPH.image.src
|
|||
<meta property="twitter:url" content={SITE.url} />
|
||||
<meta property="twitter:title" content={SITE.title} />
|
||||
<meta property="twitter:description" content={SITE.description} />
|
||||
<meta property="twitter:image" content={defaultImage} />
|
||||
<meta property="twitter:image" content={OPEN_GRAPH.image.src} />
|
||||
<meta name="twitter:image:alt" content={OPEN_GRAPH.image.alt} />
|
||||
|
||||
<meta name="theme-color" content={SITE.themeColor} />
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -9,7 +9,7 @@ import HeadSEO from '../components/HeadSEO.astro';
|
|||
<HeadCommon />
|
||||
<HeadSEO />
|
||||
</head>
|
||||
<body class="bg-primaryDotted bg-primaryDottedSize font-alt3">
|
||||
<body class="bg-primaryDotted bg-primaryDottedSize overflow-x-hidden">
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -11,7 +11,7 @@ import Item from '../components/Item.astro';
|
|||
<Picture />
|
||||
<Username />
|
||||
</header>
|
||||
<section class="mt-6 flex w-80 flex-col gap-y-6">
|
||||
<section class="mt-6 flex w-72 md:w-80 flex-col gap-y-6">
|
||||
<Item />
|
||||
</section>
|
||||
</main>
|
||||
|
|
Loading…
Reference in a new issue