@lexingtonthemes/seo 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +225 -0
- package/index.ts +7 -0
- package/package.json +58 -0
- package/src/AstroSeo.astro +42 -0
- package/src/__test__/buildTags.test.ts +441 -0
- package/src/types.ts +455 -0
- package/src/utils/buildTags.ts +457 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
export type OpeningHoursSpecification = {
|
|
2
|
+
opens: string;
|
|
3
|
+
closes: string;
|
|
4
|
+
dayOfWeek: string | string[];
|
|
5
|
+
validFrom?: string;
|
|
6
|
+
validThrough?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type Offer = {
|
|
10
|
+
priceSpecification: PriceSpecification;
|
|
11
|
+
itemOffered: Service;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type PriceSpecification = {
|
|
15
|
+
type: string;
|
|
16
|
+
priceCurrency: string;
|
|
17
|
+
price: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type Service = {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type Geo = {
|
|
26
|
+
latitude: string;
|
|
27
|
+
longitude: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type GeoCircle = {
|
|
31
|
+
geoMidpoint: Geo;
|
|
32
|
+
geoRadius: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type Action = {
|
|
36
|
+
actionName: string;
|
|
37
|
+
actionType: string;
|
|
38
|
+
target: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type Step = {
|
|
42
|
+
type: string;
|
|
43
|
+
name: string;
|
|
44
|
+
url?: string;
|
|
45
|
+
itemListElement?: StepDetails[];
|
|
46
|
+
image?: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type StepDetails = {
|
|
50
|
+
type: "HowToTip" | "HowToDirection";
|
|
51
|
+
text: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export interface Person {
|
|
55
|
+
name: string;
|
|
56
|
+
}
|
|
57
|
+
export interface Answer {
|
|
58
|
+
text: string;
|
|
59
|
+
dateCreated?: string;
|
|
60
|
+
upvoteCount?: number;
|
|
61
|
+
url?: string;
|
|
62
|
+
author?: Person;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface Question {
|
|
66
|
+
name: string;
|
|
67
|
+
answerCount: number;
|
|
68
|
+
acceptedAnswer?: Answer;
|
|
69
|
+
suggestedAnswer?: Answer[];
|
|
70
|
+
text?: string;
|
|
71
|
+
author?: Person;
|
|
72
|
+
upvoteCount?: number;
|
|
73
|
+
dateCreated?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface Instruction {
|
|
77
|
+
name?: string;
|
|
78
|
+
text: string;
|
|
79
|
+
url?: string;
|
|
80
|
+
image?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface Performer {
|
|
83
|
+
type?: "Person" | "PerformingGroup";
|
|
84
|
+
name: string;
|
|
85
|
+
}
|
|
86
|
+
export interface Place {
|
|
87
|
+
name: string;
|
|
88
|
+
address: Address;
|
|
89
|
+
sameAs?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface VirtualLocation {
|
|
93
|
+
name?: string;
|
|
94
|
+
sameAs?: string;
|
|
95
|
+
url: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type Location = Place | VirtualLocation;
|
|
99
|
+
|
|
100
|
+
export type EventStatus =
|
|
101
|
+
| "EventCancelled"
|
|
102
|
+
| "EventMovedOnline"
|
|
103
|
+
| "EventPostponed"
|
|
104
|
+
| "EventRescheduled"
|
|
105
|
+
| "EventScheduled";
|
|
106
|
+
|
|
107
|
+
export type EventAttendanceMode =
|
|
108
|
+
| "MixedEventAttendanceMode"
|
|
109
|
+
| "OfflineEventAttendanceMode"
|
|
110
|
+
| "OnlineEventAttendanceMode";
|
|
111
|
+
|
|
112
|
+
export interface Organizer {
|
|
113
|
+
type: "Person" | "Organization";
|
|
114
|
+
name: string;
|
|
115
|
+
url: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface ContactPoint {
|
|
119
|
+
contactType: string;
|
|
120
|
+
telephone: string;
|
|
121
|
+
areaServed?: string | string[];
|
|
122
|
+
availableLanguage?: string | string[];
|
|
123
|
+
contactOption?: string | string[];
|
|
124
|
+
}
|
|
125
|
+
export interface CreativeWork {
|
|
126
|
+
author: string;
|
|
127
|
+
about: string;
|
|
128
|
+
name: string;
|
|
129
|
+
datePublished: string;
|
|
130
|
+
audience?: string;
|
|
131
|
+
keywords?: string;
|
|
132
|
+
thumbnailUrl?: string;
|
|
133
|
+
image?: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface Producer {
|
|
137
|
+
name: string;
|
|
138
|
+
url?: string;
|
|
139
|
+
}
|
|
140
|
+
export interface ContactPoint {
|
|
141
|
+
contactType: string;
|
|
142
|
+
telephone: string;
|
|
143
|
+
areaServed?: string | string[];
|
|
144
|
+
availableLanguage?: string | string[];
|
|
145
|
+
contactOption?: string | string[];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface Question {
|
|
149
|
+
questionName: string;
|
|
150
|
+
acceptedAnswerText: string;
|
|
151
|
+
}
|
|
152
|
+
export interface Provider {
|
|
153
|
+
type?: "Organization" | "Person";
|
|
154
|
+
name: string;
|
|
155
|
+
url?: string;
|
|
156
|
+
}
|
|
157
|
+
export interface ItemListElements {
|
|
158
|
+
item: string;
|
|
159
|
+
name: string;
|
|
160
|
+
position: number;
|
|
161
|
+
}
|
|
162
|
+
export interface OpenGraphMedia {
|
|
163
|
+
url: string;
|
|
164
|
+
width?: number;
|
|
165
|
+
height?: number;
|
|
166
|
+
alt?: string;
|
|
167
|
+
type?: string;
|
|
168
|
+
secureUrl?: string;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface Address {
|
|
172
|
+
streetAddress: string;
|
|
173
|
+
addressLocality: string;
|
|
174
|
+
addressRegion?: string;
|
|
175
|
+
postalCode: string;
|
|
176
|
+
addressCountry: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface Video {
|
|
180
|
+
name: string;
|
|
181
|
+
description: string;
|
|
182
|
+
thumbnailUrls: string[];
|
|
183
|
+
uploadDate: string;
|
|
184
|
+
contentUrl?: string;
|
|
185
|
+
duration?: string;
|
|
186
|
+
embedUrl?: string;
|
|
187
|
+
expires?: string;
|
|
188
|
+
hasPart?: Clip | Clip[];
|
|
189
|
+
watchCount?: number;
|
|
190
|
+
publication?: BroadcastEvent | BroadcastEvent[];
|
|
191
|
+
regionsAllowed?: string | string[];
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface Clip {
|
|
195
|
+
name: string;
|
|
196
|
+
startOffset: number;
|
|
197
|
+
url: string;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface BroadcastEvent {
|
|
201
|
+
name?: string;
|
|
202
|
+
isLiveBroadcast: boolean;
|
|
203
|
+
startDate: string;
|
|
204
|
+
endDate: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export type Offers = {
|
|
208
|
+
price: string;
|
|
209
|
+
priceCurrency: string;
|
|
210
|
+
priceValidUntil?: string;
|
|
211
|
+
itemCondition?: string;
|
|
212
|
+
availability?: string;
|
|
213
|
+
url?: string;
|
|
214
|
+
seller: {
|
|
215
|
+
name: string;
|
|
216
|
+
};
|
|
217
|
+
validFrom?: string;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export type AggregateOffer = {
|
|
221
|
+
priceCurrency: string;
|
|
222
|
+
lowPrice: string;
|
|
223
|
+
highPrice?: string;
|
|
224
|
+
offerCount?: string;
|
|
225
|
+
offers?: Offers | Offers[];
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
export interface OpenGraphVideoActors {
|
|
229
|
+
profile: string;
|
|
230
|
+
role?: string;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface OpenGraph {
|
|
234
|
+
url?: string;
|
|
235
|
+
type?: string;
|
|
236
|
+
title?: string;
|
|
237
|
+
description?: string;
|
|
238
|
+
images?: ReadonlyArray<OpenGraphMedia>;
|
|
239
|
+
videos?: ReadonlyArray<OpenGraphMedia>;
|
|
240
|
+
defaultImageHeight?: number;
|
|
241
|
+
defaultImageWidth?: number;
|
|
242
|
+
locale?: string;
|
|
243
|
+
site_name?: string;
|
|
244
|
+
profile?: OpenGraphProfile;
|
|
245
|
+
book?: OpenGraphBook;
|
|
246
|
+
article?: OpenGraphArticle;
|
|
247
|
+
video?: OpenGraphVideo;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface OpenGraphProfile {
|
|
251
|
+
firstName?: string;
|
|
252
|
+
lastName?: string;
|
|
253
|
+
username?: string;
|
|
254
|
+
gender?: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface OpenGraphBook {
|
|
258
|
+
authors?: ReadonlyArray<string>;
|
|
259
|
+
isbn?: string;
|
|
260
|
+
releaseDate?: string;
|
|
261
|
+
tags?: ReadonlyArray<string>;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export interface OpenGraphArticle {
|
|
265
|
+
publishedTime?: string;
|
|
266
|
+
modifiedTime?: string;
|
|
267
|
+
expirationTime?: string;
|
|
268
|
+
|
|
269
|
+
authors?: ReadonlyArray<string>;
|
|
270
|
+
section?: string;
|
|
271
|
+
tags?: ReadonlyArray<string>;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface OpenGraphVideo {
|
|
275
|
+
actors?: ReadonlyArray<OpenGraphVideoActors>;
|
|
276
|
+
directors?: ReadonlyArray<string>;
|
|
277
|
+
writers?: ReadonlyArray<string>;
|
|
278
|
+
duration?: number;
|
|
279
|
+
releaseDate?: string;
|
|
280
|
+
tags?: ReadonlyArray<string>;
|
|
281
|
+
series?: string;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export interface Twitter {
|
|
285
|
+
handle?: string;
|
|
286
|
+
site?: string;
|
|
287
|
+
cardType?: string;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
interface MobileAlternate {
|
|
291
|
+
media: string;
|
|
292
|
+
href: string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
interface LanguageAlternate {
|
|
296
|
+
hreflang: string;
|
|
297
|
+
href: string;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
interface LinkTag {
|
|
301
|
+
rel: string;
|
|
302
|
+
href: string;
|
|
303
|
+
sizes?: string;
|
|
304
|
+
media?: string;
|
|
305
|
+
type?: string;
|
|
306
|
+
color?: string;
|
|
307
|
+
as?: string;
|
|
308
|
+
crossOrigin?: string;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface BaseMetaTag {
|
|
312
|
+
content: string;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface HTML5MetaTag extends BaseMetaTag {
|
|
316
|
+
name: string;
|
|
317
|
+
property?: undefined;
|
|
318
|
+
httpEquiv?: undefined;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export interface RDFaMetaTag extends BaseMetaTag {
|
|
322
|
+
property: string;
|
|
323
|
+
name?: undefined;
|
|
324
|
+
httpEquiv?: undefined;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export interface HTTPEquivMetaTag extends BaseMetaTag {
|
|
328
|
+
httpEquiv:
|
|
329
|
+
| "content-security-policy"
|
|
330
|
+
| "content-type"
|
|
331
|
+
| "default-style"
|
|
332
|
+
| "x-ua-compatible"
|
|
333
|
+
| "refresh";
|
|
334
|
+
name?: undefined;
|
|
335
|
+
property?: undefined;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export type MetaTag = HTML5MetaTag | RDFaMetaTag | HTTPEquivMetaTag;
|
|
339
|
+
|
|
340
|
+
export type ImagePrevSize = "none" | "standard" | "large";
|
|
341
|
+
|
|
342
|
+
export type AggregateRating = {
|
|
343
|
+
ratingValue: string;
|
|
344
|
+
reviewCount?: string;
|
|
345
|
+
ratingCount?: string;
|
|
346
|
+
bestRating?: string;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
export type GamePlayMode = "CoOp" | "MultiPlayer" | "SinglePlayer";
|
|
350
|
+
|
|
351
|
+
export type Review = {
|
|
352
|
+
author: string;
|
|
353
|
+
datePublished?: string;
|
|
354
|
+
reviewBody?: string;
|
|
355
|
+
name?: string;
|
|
356
|
+
publisher?: Publisher;
|
|
357
|
+
reviewRating: ReviewRating;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
export type ReviewRating = {
|
|
361
|
+
bestRating?: string;
|
|
362
|
+
ratingValue: string;
|
|
363
|
+
worstRating?: string;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export type Author = {
|
|
367
|
+
type: string;
|
|
368
|
+
name: string;
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
export type ArticleAuthor = {
|
|
372
|
+
name: string;
|
|
373
|
+
url: string;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
export type Publisher = {
|
|
377
|
+
type: string;
|
|
378
|
+
name: string;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
export type ReviewedBy = {
|
|
382
|
+
type?: string;
|
|
383
|
+
name: string;
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
export type ApplicationCategory =
|
|
387
|
+
| "Game"
|
|
388
|
+
| "SocialNetworking"
|
|
389
|
+
| "Travel"
|
|
390
|
+
| "Shopping"
|
|
391
|
+
| "Sports"
|
|
392
|
+
| "Lifestyle"
|
|
393
|
+
| "Business"
|
|
394
|
+
| "Design"
|
|
395
|
+
| "Developer"
|
|
396
|
+
| "Driver"
|
|
397
|
+
| "Educational"
|
|
398
|
+
| "Health"
|
|
399
|
+
| "Finance"
|
|
400
|
+
| "Security"
|
|
401
|
+
| "Browser"
|
|
402
|
+
| "Communication"
|
|
403
|
+
| "DesktopEnhancement"
|
|
404
|
+
| "Entertainment"
|
|
405
|
+
| "Multimedia"
|
|
406
|
+
| "Home"
|
|
407
|
+
| "Utilities"
|
|
408
|
+
| "Reference";
|
|
409
|
+
|
|
410
|
+
export type OrganizationCategory =
|
|
411
|
+
| "Airline"
|
|
412
|
+
| "Consortium"
|
|
413
|
+
| "Corporation"
|
|
414
|
+
| "EducationalOrganization"
|
|
415
|
+
| "FundingScheme"
|
|
416
|
+
| "GovernmentOrganization"
|
|
417
|
+
| "LibrarySystem"
|
|
418
|
+
| "LocalBusiness"
|
|
419
|
+
| "MedicalOrganization"
|
|
420
|
+
| "NGO"
|
|
421
|
+
| "NewsMediaOrganization"
|
|
422
|
+
| "PerformingGroup"
|
|
423
|
+
| "Project"
|
|
424
|
+
| "ResearchOrganization"
|
|
425
|
+
| "SportsOrganization"
|
|
426
|
+
| "WorkersUnion"
|
|
427
|
+
| "Organization";
|
|
428
|
+
|
|
429
|
+
export interface AdditionalRobotsProps {
|
|
430
|
+
nosnippet?: boolean;
|
|
431
|
+
maxSnippet?: number;
|
|
432
|
+
maxImagePreview?: ImagePrevSize;
|
|
433
|
+
maxVideoPreview?: number;
|
|
434
|
+
noarchive?: boolean;
|
|
435
|
+
unavailableAfter?: string;
|
|
436
|
+
noimageindex?: boolean;
|
|
437
|
+
notranslate?: boolean;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export interface AstroSeoProps {
|
|
441
|
+
title?: string;
|
|
442
|
+
titleTemplate?: string;
|
|
443
|
+
noindex?: boolean;
|
|
444
|
+
nofollow?: boolean;
|
|
445
|
+
robotsProps?: AdditionalRobotsProps;
|
|
446
|
+
description?: string;
|
|
447
|
+
canonical?: string;
|
|
448
|
+
mobileAlternate?: MobileAlternate;
|
|
449
|
+
languageAlternates?: ReadonlyArray<LanguageAlternate>;
|
|
450
|
+
openGraph?: OpenGraph;
|
|
451
|
+
facebook?: { appId: string };
|
|
452
|
+
twitter?: Twitter;
|
|
453
|
+
additionalMetaTags?: ReadonlyArray<MetaTag>;
|
|
454
|
+
additionalLinkTags?: ReadonlyArray<LinkTag>;
|
|
455
|
+
}
|