/
open-graph.ts
201 lines (199 loc) · 5.06 KB
/
open-graph.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
import type { ReactiveHead } from '@unhead/vue'
import type { MetaFlatInput } from '@unhead/schema'
export interface OpenGraphTagDefine {
name: string
suggestion: 'required' | 'recommended' | 'optional'
head: Partial<ReactiveHead>
seoMeta?: Partial<MetaFlatInput> & { title?: string }
docs?: string
description?: string
}
export const ogTags: OpenGraphTagDefine[] = [
{
name: 'title',
suggestion: 'required',
head: {
title: '[title]',
},
seoMeta: {
title: '[title]',
},
docs: 'https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title',
description: 'A concise and descriptive title for the browser that accurately summarizes the content of the page.',
},
{
name: 'description',
suggestion: 'required',
head: {
meta: [
{
name: 'description',
content: '[description]',
},
],
},
seoMeta: {
description: '[description]',
},
description: 'A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results.',
},
{
name: 'icon',
suggestion: 'recommended',
head: {
link: [
{
rel: 'icon',
type: 'image/png',
href: '/favicon.png',
},
],
},
description: 'A small image that appears in the browser tab and bookmark menu to help users easily identify the page.',
},
{
name: 'lang',
suggestion: 'recommended',
head: {
htmlAttrs: {
lang: 'en',
},
},
description: 'The primary language of the page to help search engines and browsers understand the content.',
},
{
name: 'og:title',
suggestion: 'recommended',
head: {
meta: [
{
property: 'og:title',
content: '[og:title]',
},
],
},
seoMeta: {
ogTitle: '[og:title]',
},
docs: 'https://ogp.me/#metadata',
description: 'A title for the link preview used by social media platforms.',
},
{
name: 'og:description',
suggestion: 'recommended',
head: {
meta: [
{
property: 'og:description',
content: '[og:description]',
},
],
},
seoMeta: {
ogDescription: '[og:description]',
},
docs: 'https://ogp.me/#metadata',
description: 'A description for the link preview used by social media platforms.',
},
{
name: 'og:image',
suggestion: 'recommended',
head: {
meta: [
{
property: 'og:image',
content: '[og:image]',
},
],
},
seoMeta: {
ogImage: '[og:image]',
},
docs: 'https://ogp.me/#metadata',
description: 'An image for the link preview used by social media platforms.',
},
{
name: 'og:url',
suggestion: 'recommended',
head: {
meta: [
{
property: 'og:url',
content: '[og:url]',
},
],
},
seoMeta: {
ogUrl: '[og:url]',
},
docs: 'https://ogp.me/#metadata',
description: 'A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page.',
},
{
name: 'twitter:title',
suggestion: 'recommended',
head: {
meta: [
{
name: 'twitter:title',
content: '[twitter:title]',
},
],
},
seoMeta: {
twitterTitle: '[twitter:title]',
},
docs: 'https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards',
description: 'A title for the Twitter card used to provide a preview of the content shared on the page.',
},
{
name: 'twitter:description',
suggestion: 'recommended',
head: {
meta: [{
name: 'twitter:description',
content: '[twitter:description]',
},
],
},
seoMeta: {
twitterDescription: '[twitter:description]',
},
docs: 'https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards',
description: 'A description for the Twitter card used to provide a preview of the content shared on the page.',
},
{
name: 'twitter:image',
suggestion: 'recommended',
head: {
meta: [
{
name: 'twitter:image',
content: '[twitter:image]',
},
],
},
seoMeta: {
twitterImage: '[twitter:image]',
},
docs: 'https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards',
description: 'An image for the Twitter card used to provide a preview of the content shared on the page.',
},
{
name: 'twitter:card',
suggestion: 'recommended',
head: {
meta: [
{
name: 'twitter:card',
content: 'summary',
},
],
},
seoMeta: {
twitterCard: 'summary',
},
docs: 'https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards',
description: 'The type of Twitter card to use, which determines the type of card to display in link previews on Twitter.',
},
]