Added social URL

This commit is contained in:
Maxi Ferreira 2021-11-30 22:19:01 -08:00
parent 9b1f0044f8
commit ab2ab51ddb
2 changed files with 3 additions and 2 deletions

BIN
public/assets/social.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 KiB

View File

@ -5,6 +5,7 @@ export interface Props {
permalink: string; permalink: string;
} }
const { title, description, permalink } = Astro.props; const { title, description, permalink } = Astro.props;
const socialUrl = Astro.site.href + 'assets/social.png'
--- ---
<!-- Global Metadata --> <!-- Global Metadata -->
@ -23,14 +24,14 @@ const { title, description, permalink } = Astro.props;
<meta property="og:url" content={permalink} /> <meta property="og:url" content={permalink} />
<meta property="og:title" content={title} /> <meta property="og:title" content={title} />
<meta property="og:description" content={description} /> <meta property="og:description" content={description} />
<meta property="og:image" content="https://astro.build/social.jpg?v=1" /> <meta property="og:image" content={socialUrl} />
<!-- Twitter --> <!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" /> <meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content={permalink} /> <meta property="twitter:url" content={permalink} />
<meta property="twitter:title" content={title} /> <meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} /> <meta property="twitter:description" content={description} />
<meta property="twitter:image" content="https://astro.build/social.jpg?v=1" /> <meta property="twitter:image" content={socialUrl} />
<!-- Fonts --> <!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">