File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 22interface Props {
33 title: string
44 description? : string
5+ image? : string
56 favicon? : string
67 faviconMimeType? : string
78 canonicalURL? : string | undefined
@@ -13,6 +14,7 @@ interface Props {
1314const {
1415 title,
1516 description,
17+ image = ' default-post-thumbnail.png' ,
1618 favicon,
1719 faviconMimeType,
1820 canonicalURL,
@@ -40,3 +42,17 @@ const _canonicalURL = canonicalURL || Astro.url.href
4042<meta name =" author" content ={ author } />
4143{ robots && <meta name = " robots" content = { robots } />}
4244<meta name =" generator" content ={ Astro .generator } />
45+
46+ <!-- Open Graph / Facebook -->
47+ <meta property =" og:type" content =" website" />
48+ <meta property =" og:url" content ={ Astro .url } />
49+ <meta property =" og:title" content ={ title } />
50+ <meta property =" og:description" content ={ description } />
51+ <meta property =" og:image" content ={ new URL (image , Astro .url )} />
52+
53+ <!-- Twitter -->
54+ <meta property =" twitter:card" content =" summary_large_image" />
55+ <meta property =" twitter:url" content ={ Astro .url } />
56+ <meta property =" twitter:title" content ={ title } />
57+ <meta property =" twitter:description" content ={ description } />
58+ <meta property =" twitter:image" content ={ new URL (image , Astro .url )} />
You can’t perform that action at this time.
0 commit comments