@@ -76,10 +76,16 @@ interface SEOProps {
76
76
title ?: string
77
77
description ?: string
78
78
keywords ?: string | string [ ]
79
+ url ?: string
79
80
image ?: string
81
+ twitter ?: {
82
+ card ?: 'summary' | 'summary_large_image' | 'app' | 'player'
83
+ site ?: string
84
+ creator ?: string
85
+ }
80
86
}
81
87
82
- export function SEO ( { title, description, keywords, image } : SEOProps ) {
88
+ export function SEO ( { title, description, keywords, url , image, twitter } : SEOProps ) {
83
89
return createElement (
84
90
Head ,
85
91
undefined ,
@@ -90,9 +96,12 @@ export function SEO({ title, description, keywords, image }: SEOProps) {
90
96
description && createElement ( 'meta' , { name : 'og:description' , content : description } ) ,
91
97
title && createElement ( 'meta' , { name : 'twitter:title' , content : title } ) ,
92
98
description && createElement ( 'meta' , { name : 'twitter:description' , content : description } ) ,
99
+ url && createElement ( 'meta' , { name : 'og:url' , content : url } ) ,
93
100
image && createElement ( 'meta' , { name : 'og:image' , content : image } ) ,
94
- image && createElement ( 'meta' , { name : 'twitter:image:src' , content : image } ) ,
95
- image && createElement ( 'meta' , { name : 'twitter:card' , content : 'summary_large_image' } ) ,
101
+ image && createElement ( 'meta' , { name : 'twitter:image' , content : image } ) ,
102
+ image && createElement ( 'meta' , { name : 'twitter:card' , content : twitter ?. card || 'summary_large_image' } ) ,
103
+ twitter ?. site && createElement ( 'meta' , { name : 'twitter:site' , content : twitter . site } ) ,
104
+ twitter ?. creator && createElement ( 'meta' , { name : 'twitter:creator' , content : twitter . creator } ) ,
96
105
)
97
106
}
98
107
0 commit comments