@getvitops/generator 2.0.0 → 2.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/CHANGELOG.md +72 -0
- package/dist/index.d.mts +69 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +46 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/site.schema.json +64 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,77 @@
|
|
|
1
1
|
# @getvitops/generator
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 20e518e: Add `vitops indexing` — tell search engines about a deploy, instead of opening Search Console by hand.
|
|
8
|
+
|
|
9
|
+
Configure it in your site config under `seo.indexing`, then run it after deploying:
|
|
10
|
+
|
|
11
|
+
```jsonc
|
|
12
|
+
"seo": {
|
|
13
|
+
"indexing": {
|
|
14
|
+
"indexNow": { "key": "…" },
|
|
15
|
+
"searchConsole": { "siteUrl": "sc-domain:acme.ca" },
|
|
16
|
+
"priorityUrls": ["https://acme.ca/", "https://acme.ca/services"]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
vitops indexing --dry # print the plan, make no requests
|
|
23
|
+
vitops indexing # submit
|
|
24
|
+
vitops indexing --check # a day or two later: did Google actually index them?
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
It reads your sitemap, diffs it against the previous run, and submits only what changed —
|
|
28
|
+
pinging **IndexNow** and re-submitting your sitemap through the **Search Console API**.
|
|
29
|
+
`--check` inspects `priorityUrls` and exits non-zero on a page Google hasn't indexed, so a
|
|
30
|
+
scheduled CI job can catch a page that quietly fell out of the index.
|
|
31
|
+
|
|
32
|
+
**Be clear-eyed about what this can do.** Google exposes no API that requests indexing — the
|
|
33
|
+
button in Search Console isn't available anywhere, URL Inspection is read-only, and the sitemap
|
|
34
|
+
ping endpoint was removed in 2023. IndexNow reaches Bing, Yandex, Naver, Seznam and Yep; Google
|
|
35
|
+
doesn't participate. So this automates every sanctioned step and then verifies the outcome; it
|
|
36
|
+
does not make Google re-index on demand, and nothing can. Google's Indexing API is deliberately
|
|
37
|
+
not wired: it's scoped to job postings and livestreams, and using it for ordinary pages violates
|
|
38
|
+
its terms.
|
|
39
|
+
|
|
40
|
+
Also new, and worth wiring at the same time — **`gitLastmod()` for real sitemap dates**:
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
import vitops, { gitLastmod } from '@getvitops/astro';
|
|
44
|
+
vitops({ sitemap: { serialize: await gitLastmod() } });
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`@astrojs/sitemap` emits no `<lastmod>` by default, which means a crawler is told your pages
|
|
48
|
+
exist but never that one changed — and it's what lets `vitops indexing` submit a handful of URLs instead
|
|
49
|
+
of all of them. `gitLastmod()` derives each date from the source file's last commit, and leaves a
|
|
50
|
+
page alone rather than guessing (dynamic routes, ambiguous slugs, shallow clones): an inaccurate
|
|
51
|
+
`lastmod` is worse than none, because Google stops trusting the field site-wide.
|
|
52
|
+
|
|
53
|
+
Requires `fetch-depth: 0` in CI — the default shallow clone has no history to read, and it warns
|
|
54
|
+
when that's the case.
|
|
55
|
+
|
|
56
|
+
**Credentials.** IndexNow's key is public by design (it's served at `/<key>.txt` as the ownership
|
|
57
|
+
proof), so it lives in your config, and the Astro integration writes the file into `public/` for
|
|
58
|
+
you — `vitops indexing --new-key` generates one, `--write-key <dir>` writes it for non-Astro stacks.
|
|
59
|
+
Search Console needs a service account in `VITOPS_GSC_SERVICE_ACCOUNT` or
|
|
60
|
+
`GOOGLE_APPLICATION_CREDENTIALS`, added as an owner of the property; it's never read from the
|
|
61
|
+
config file.
|
|
62
|
+
|
|
63
|
+
Persist `.vitops/` between runs (a CI cache) — that's the changed-URL state, and without it every
|
|
64
|
+
run submits everything.
|
|
65
|
+
|
|
66
|
+
An environment whose `robots` policy says `noindex` is refused outright, so pointing this at
|
|
67
|
+
staging can't publish it to a search engine.
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Updated dependencies [20e518e]
|
|
72
|
+
- Updated dependencies [9bf975a]
|
|
73
|
+
- @getvitops/utils@2.1.0
|
|
74
|
+
|
|
3
75
|
## 2.0.0
|
|
4
76
|
|
|
5
77
|
### Major Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -353,6 +353,42 @@ declare const SiteFontSchema: z.ZodMiniObject<{
|
|
|
353
353
|
}>>;
|
|
354
354
|
}, z.z.core.$strip>>]>>;
|
|
355
355
|
}, z.z.core.$strip>;
|
|
356
|
+
/**
|
|
357
|
+
* What `vitops notify` needs to tell search engines a deploy happened.
|
|
358
|
+
*
|
|
359
|
+
* Scoped by what search engines actually accept, which is narrower than it looks:
|
|
360
|
+
* Google exposes **no** "request indexing" API (the Search Console button is not in
|
|
361
|
+
* its API, and URL Inspection is read-only), and it removed the sitemap ping
|
|
362
|
+
* endpoint in 2023. So the sanctioned set is: an accurate sitemap, a Search Console
|
|
363
|
+
* sitemap resubmit, an IndexNow ping — which Google does *not* honour but Bing,
|
|
364
|
+
* Yandex, Naver, Seznam and Yep do — and a read-only inspection pass to find out
|
|
365
|
+
* what Google actually did.
|
|
366
|
+
*
|
|
367
|
+
* Facts only, the same rule the legal block follows: this records what the site has
|
|
368
|
+
* (a key, a property, which pages matter), never what to say about it.
|
|
369
|
+
*/
|
|
370
|
+
declare const IndexNowSchema: z.ZodMiniObject<{
|
|
371
|
+
key: z.ZodMiniString<string>;
|
|
372
|
+
keyLocation: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
373
|
+
endpoint: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
374
|
+
}, z.z.core.$strip>;
|
|
375
|
+
declare const SearchConsoleSchema: z.ZodMiniObject<{
|
|
376
|
+
siteUrl: z.ZodMiniString<string>;
|
|
377
|
+
resubmitSitemap: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
378
|
+
}, z.z.core.$strip>;
|
|
379
|
+
declare const IndexingSchema: z.ZodMiniObject<{
|
|
380
|
+
sitemapUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
381
|
+
indexNow: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
382
|
+
key: z.ZodMiniString<string>;
|
|
383
|
+
keyLocation: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
384
|
+
endpoint: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
385
|
+
}, z.z.core.$strip>>;
|
|
386
|
+
searchConsole: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
387
|
+
siteUrl: z.ZodMiniString<string>;
|
|
388
|
+
resubmitSitemap: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
389
|
+
}, z.z.core.$strip>>;
|
|
390
|
+
priorityUrls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniURL>>;
|
|
391
|
+
}, z.z.core.$strip>;
|
|
356
392
|
/**
|
|
357
393
|
* Which template set the generated legal documents are written against. This is
|
|
358
394
|
* a closed enum rather than a free string because an unrecognised value would
|
|
@@ -796,6 +832,19 @@ declare const SiteConfigSchema: z.ZodMiniObject<{
|
|
|
796
832
|
height: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
797
833
|
}, z.z.core.$strip>]>>;
|
|
798
834
|
}, z.z.core.$strip>>;
|
|
835
|
+
indexing: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
836
|
+
sitemapUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
837
|
+
indexNow: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
838
|
+
key: z.ZodMiniString<string>;
|
|
839
|
+
keyLocation: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
840
|
+
endpoint: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
841
|
+
}, z.z.core.$strip>>;
|
|
842
|
+
searchConsole: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
843
|
+
siteUrl: z.ZodMiniString<string>;
|
|
844
|
+
resubmitSitemap: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
845
|
+
}, z.z.core.$strip>>;
|
|
846
|
+
priorityUrls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniURL>>;
|
|
847
|
+
}, z.z.core.$strip>>;
|
|
799
848
|
}, z.z.core.$strip>>;
|
|
800
849
|
analytics: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
801
850
|
googleAnalyticsId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -902,6 +951,12 @@ declare const SiteConfigSchema: z.ZodMiniObject<{
|
|
|
902
951
|
type SiteConfig = z.infer<typeof SiteConfigSchema>;
|
|
903
952
|
/** One `fonts[]` entry — a serialisable projection of an Astro Fonts API family. */
|
|
904
953
|
type SiteFont = z.infer<typeof SiteFontSchema>;
|
|
954
|
+
/** The `seo.indexing` block — what `vitops notify` reads. */
|
|
955
|
+
type SiteIndexing = z.infer<typeof IndexingSchema>;
|
|
956
|
+
/** IndexNow submission settings. The `key` is public by design. */
|
|
957
|
+
type SiteIndexNow = z.infer<typeof IndexNowSchema>;
|
|
958
|
+
/** Google Search Console property settings. The credential is never in the config. */
|
|
959
|
+
type SiteSearchConsole = z.infer<typeof SearchConsoleSchema>;
|
|
905
960
|
declare const SITE_SCHEMA_URL = "https://unpkg.com/@getvitops/generator/site.schema.json";
|
|
906
961
|
/** The published JSON Schema (draft-2020-12), derived from the zod schema. */
|
|
907
962
|
declare const siteJsonSchema: {
|
|
@@ -1339,6 +1394,19 @@ declare const siteJsonSchema: {
|
|
|
1339
1394
|
height: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
1340
1395
|
}, z.z.core.$strip>]>>;
|
|
1341
1396
|
}, z.z.core.$strip>>;
|
|
1397
|
+
indexing: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1398
|
+
sitemapUrl: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
1399
|
+
indexNow: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1400
|
+
key: z.ZodMiniString<string>;
|
|
1401
|
+
keyLocation: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
1402
|
+
endpoint: z.ZodMiniOptional<z.ZodMiniURL>;
|
|
1403
|
+
}, z.z.core.$strip>>;
|
|
1404
|
+
searchConsole: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1405
|
+
siteUrl: z.ZodMiniString<string>;
|
|
1406
|
+
resubmitSitemap: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
1407
|
+
}, z.z.core.$strip>>;
|
|
1408
|
+
priorityUrls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniURL>>;
|
|
1409
|
+
}, z.z.core.$strip>>;
|
|
1342
1410
|
}, z.z.core.$strip>>;
|
|
1343
1411
|
analytics: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
1344
1412
|
googleAnalyticsId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -2330,5 +2398,5 @@ declare function generateLegal(site: SiteConfig, opts?: GenerateLegalOptions): R
|
|
|
2330
2398
|
*/
|
|
2331
2399
|
declare function defaultConfig(): DesignSystem;
|
|
2332
2400
|
//#endregion
|
|
2333
|
-
export { BASE_HOOK, type Block, CONTRAST, type ColorUtility, type ContactObject, DARK_SEL, DOC_ORDER, DOC_SLUGS, type DesignSystem, DesignSystemSchema, type DocSet, type ExpandedHue, type Format, type FunctionalRole, type GenerateLegalOptions, type GenerateOptions, type GenerateResult, type IconSpriteOptions, type IconSpriteResult, JURISDICTIONS, type Jurisdiction, KNOWN_PROCESSORS, type KnownProcessorKey, type LegalDoc, type LegalOutput, NUMERIC_STEPS, type PolicyVars, type PostalAddress, type Processor, REQUIRED_ROLES, ROLE_TOKEN_KEYS, type ResolvedInput, type RoleKind, type RoleSpec, SCHEMA_URL, SITE_SCHEMA_URL, type SiteConfig, SiteConfigSchema, type SiteFont, SiteFontSchema, type SiteValidationResult, type Span, type StylesheetFormat, TEMPLATES, TW_CLASH, type ValidationResult, buildIconSprite, deepMerge, defaultConfig, derivePolicyVars, detectProcessorKeys, enabledDocs, expandPalette, functionalRole, generate, generateDocs, generateLegal, isSiteConfig, jsonSchema, loadIconSvg, parseMarkdown, renderMarkdown, renderNodes, resolveInput, resolvePrivacyContact, resolveProcessors, resolveSiteConfig, resolveTheme, roleColorUtilities, roleHue, roleKind, siteJsonSchema, spriteId, stripNulls, toContentNodes, toHtmlFragment, toPortableText, tokenClass, tokenVar, validate, validateSite };
|
|
2401
|
+
export { BASE_HOOK, type Block, CONTRAST, type ColorUtility, type ContactObject, DARK_SEL, DOC_ORDER, DOC_SLUGS, type DesignSystem, DesignSystemSchema, type DocSet, type ExpandedHue, type Format, type FunctionalRole, type GenerateLegalOptions, type GenerateOptions, type GenerateResult, type IconSpriteOptions, type IconSpriteResult, JURISDICTIONS, type Jurisdiction, KNOWN_PROCESSORS, type KnownProcessorKey, type LegalDoc, type LegalOutput, NUMERIC_STEPS, type PolicyVars, type PostalAddress, type Processor, REQUIRED_ROLES, ROLE_TOKEN_KEYS, type ResolvedInput, type RoleKind, type RoleSpec, SCHEMA_URL, SITE_SCHEMA_URL, type SiteConfig, SiteConfigSchema, type SiteFont, SiteFontSchema, type SiteIndexNow, type SiteIndexing, type SiteSearchConsole, type SiteValidationResult, type Span, type StylesheetFormat, TEMPLATES, TW_CLASH, type ValidationResult, buildIconSprite, deepMerge, defaultConfig, derivePolicyVars, detectProcessorKeys, enabledDocs, expandPalette, functionalRole, generate, generateDocs, generateLegal, isSiteConfig, jsonSchema, loadIconSvg, parseMarkdown, renderMarkdown, renderNodes, resolveInput, resolvePrivacyContact, resolveProcessors, resolveSiteConfig, resolveTheme, roleColorUtilities, roleHue, roleKind, siteJsonSchema, spriteId, stripNulls, toContentNodes, toHtmlFragment, toPortableText, tokenClass, tokenVar, validate, validateSite };
|
|
2334
2402
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":["left","top","width","height","rotate","hFlip","vFlip","IconifyDimenisons","IconifyTransformations","IconifyOptional","parent","body","hidden","IconifyIcon","APIIconAttributes","IconifyAlias","index","ExtendedIconifyIcon","ExtendedIconifyAlias","name","total","version","author","url","license","title","spdx","samples","displayHeight","category","tags","palette","prefix","suffix","info","IconifyInfo","chars","IconifyChars","categories","IconifyCategories","themes","LegacyIconifyThemes","prefixes","Record","suffixes","provider","icons","IconifyIcons","aliases","IconifyAliases","IconifyJSONIconsData","IconifyMetaData","lastModified","not_found","IconifyJSON","metadata"],"sources":["../src/schema.ts","../src/site.ts","../src/tokens.ts","../src/generate.ts","../src/docs.ts","../../../node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts","../src/icons-sprite.ts","../src/shared.ts","../src/legal/providers.ts","../src/legal/derive.ts","../src/legal/templates/cookies.ca.ts","../src/legal/templates/privacy.ca.ts","../src/legal/templates/terms.ca.ts","../src/legal/templates/index.ts","../src/legal/render.ts","../src/legal/index.ts","../src/index.ts"],"x_google_ignoreList":[5],"mappings":";;;;cAkQa,kBAAA,EAAkB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0CnB,YAAA,GAAe,CAAA,CAAE,KAAK,QAAQ,kBAAA;;;;;;cA0B7B,UAAA;;cAGA,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkDD,gBAAA;EACN,EAAA;EAAU,IAAA,EAAM,YAAA;EAAc,MAAA;EAAY,QAAA;AAAA;EAC1C,EAAA;EAAW,IAAA;EAAiB,MAAA,EAAQ,CAAA,CAAE,IAAA,CAAK,SAAS;EAAI,QAAA;AAAA;;;;;;;;iBAsD9C,QAAA,CAAS,KAAA,YAAiB,gBAAgB;;;cC3TpD,mBAAA,EAAmB,CAAA,CAAA,aAAA;;;;;;;cAWnB,mBAAA,EAAmB,CAAA,CAAA,aAAA;;;;;;;;;;;;KAUb,aAAA,GAAgB,CAAA,CAAE,KAAK,QAAQ,mBAAA;AAAA,KAC/B,aAAA,GAAgB,CAAA,CAAE,KAAK,QAAQ,mBAAA;AAAA,cAsI9B,cAAA,EAAc,CAAA,CAAA,aAAA
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["left","top","width","height","rotate","hFlip","vFlip","IconifyDimenisons","IconifyTransformations","IconifyOptional","parent","body","hidden","IconifyIcon","APIIconAttributes","IconifyAlias","index","ExtendedIconifyIcon","ExtendedIconifyAlias","name","total","version","author","url","license","title","spdx","samples","displayHeight","category","tags","palette","prefix","suffix","info","IconifyInfo","chars","IconifyChars","categories","IconifyCategories","themes","LegacyIconifyThemes","prefixes","Record","suffixes","provider","icons","IconifyIcons","aliases","IconifyAliases","IconifyJSONIconsData","IconifyMetaData","lastModified","not_found","IconifyJSON","metadata"],"sources":["../src/schema.ts","../src/site.ts","../src/tokens.ts","../src/generate.ts","../src/docs.ts","../../../node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts","../src/icons-sprite.ts","../src/shared.ts","../src/legal/providers.ts","../src/legal/derive.ts","../src/legal/templates/cookies.ca.ts","../src/legal/templates/privacy.ca.ts","../src/legal/templates/terms.ca.ts","../src/legal/templates/index.ts","../src/legal/render.ts","../src/legal/index.ts","../src/index.ts"],"x_google_ignoreList":[5],"mappings":";;;;cAkQa,kBAAA,EAAkB,CAAA,CAAA,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAAA;EACrB,IAAA;EAAe,KAAA,EAAO,IAAA;AAAA;;iBA4CZ,aAAA,CAAc,EAAA,WAAa,KAAK;;;;;iBAsEhC,cAAA,CAAe,MAAA,EAAQ,KAAA,KAAU,WAAW;AAAA,iBAkB5C,cAAA,CAAe,MAAe,EAAP,KAAK;;;;;;;;;;;;;;iBAmB5B,cAAA,CAAe,MAAA,EAAQ,KAAK,IAAI,MAAA;;;KCrKpC,WAAA;AAAA,UAEK,oBAAA;;EAEf,IAAA,GAAO,QAAA;;EAEP,MAAA,GAAS,WAAW;AAAA;;iBAUN,WAAA,CAAY,IAAA,EAAM,UAAA,GAAa,QAAQ;;iBAWvC,cAAA,CAAe,IAAA,EAAM,UAAA,EAAY,GAAA,EAAK,QAAA,EAAU,IAAA,GAAO,UAAA;;;;;;iBAcvD,WAAA,CAAY,IAAA,EAAM,UAAA,EAAY,GAAA,EAAK,QAAA,GAAW,WAAA;;;;;;;iBAU9C,aAAA,CACd,IAAA,EAAM,UAAA,EACN,IAAA,GAAM,oBAAA,GACL,MAAA;;;;;;;;iBCwCa,aAAA,IAAiB,YAAY"}
|
package/dist/index.mjs
CHANGED
|
@@ -3105,6 +3105,35 @@ const TwitterSchema = z.object({
|
|
|
3105
3105
|
image: z.optional(ImageRefSchema)
|
|
3106
3106
|
});
|
|
3107
3107
|
/**
|
|
3108
|
+
* What `vitops notify` needs to tell search engines a deploy happened.
|
|
3109
|
+
*
|
|
3110
|
+
* Scoped by what search engines actually accept, which is narrower than it looks:
|
|
3111
|
+
* Google exposes **no** "request indexing" API (the Search Console button is not in
|
|
3112
|
+
* its API, and URL Inspection is read-only), and it removed the sitemap ping
|
|
3113
|
+
* endpoint in 2023. So the sanctioned set is: an accurate sitemap, a Search Console
|
|
3114
|
+
* sitemap resubmit, an IndexNow ping — which Google does *not* honour but Bing,
|
|
3115
|
+
* Yandex, Naver, Seznam and Yep do — and a read-only inspection pass to find out
|
|
3116
|
+
* what Google actually did.
|
|
3117
|
+
*
|
|
3118
|
+
* Facts only, the same rule the legal block follows: this records what the site has
|
|
3119
|
+
* (a key, a property, which pages matter), never what to say about it.
|
|
3120
|
+
*/
|
|
3121
|
+
const IndexNowSchema = z.object({
|
|
3122
|
+
key: desc(z.string().check(z.regex(/^[a-zA-Z0-9-]{8,128}$/)), "IndexNow key (8–128 chars, hex is conventional). NOT a secret — it is served publicly at `keyLocation` so the engine can verify you own the host. Generate one with `vitops notify --new-key`."),
|
|
3123
|
+
keyLocation: desc(z.optional(z.url()), "Absolute URL of the key file. Defaults to `<canonical>/<key>.txt`; set it only when the file lives elsewhere."),
|
|
3124
|
+
endpoint: desc(z.optional(z.url()), "IndexNow endpoint (default `https://api.indexnow.org/indexnow`). Any participating engine shares submissions with the rest, so one is normally enough.")
|
|
3125
|
+
});
|
|
3126
|
+
const SearchConsoleSchema = z.object({
|
|
3127
|
+
siteUrl: desc(z.string(), "The property exactly as Search Console identifies it — `sc-domain:acme.ca` for a domain property, or the URL-prefix form `https://acme.ca/`. A mismatch here is a 403, not a \"not found\"."),
|
|
3128
|
+
resubmitSitemap: desc(z.optional(z.boolean()), "Re-submit the sitemap through the Search Console API on each notify (default true when `searchConsole` is set). This is the automated equivalent of the manual resubmit in the UI.")
|
|
3129
|
+
});
|
|
3130
|
+
const IndexingSchema = z.object({
|
|
3131
|
+
sitemapUrl: desc(z.optional(z.url()), "The sitemap to submit and to diff for changed URLs. Defaults to `<canonical>/sitemap-index.xml`."),
|
|
3132
|
+
indexNow: desc(z.optional(IndexNowSchema), "IndexNow submission (Bing, Yandex, Naver, Seznam, Yep — not Google). Omit to skip the channel."),
|
|
3133
|
+
searchConsole: desc(z.optional(SearchConsoleSchema), "Google Search Console property. Needs a service-account credential in `VITOPS_GSC_SERVICE_ACCOUNT` or `GOOGLE_APPLICATION_CREDENTIALS` at run time — never put the key in this file."),
|
|
3134
|
+
priorityUrls: desc(z.optional(z.array(z.url())), "The pages whose indexing actually matters. `vitops notify --check` inspects these and exits non-zero if Google has not indexed one. Kept explicit because URL Inspection is quota-bound (2000/day), so checking every page is neither affordable nor informative.")
|
|
3135
|
+
});
|
|
3136
|
+
/**
|
|
3108
3137
|
* Which template set the generated legal documents are written against. This is
|
|
3109
3138
|
* a closed enum rather than a free string because an unrecognised value would
|
|
3110
3139
|
* otherwise silently fall back to the wrong body of law; `validateSite` rejects
|
|
@@ -3176,8 +3205,9 @@ const SiteConfigSchema = z.object({
|
|
|
3176
3205
|
googleSiteVerification: z.optional(z.string()),
|
|
3177
3206
|
bingSiteVerification: z.optional(z.string()),
|
|
3178
3207
|
openGraph: z.optional(OpenGraphSchema),
|
|
3179
|
-
twitter: z.optional(TwitterSchema)
|
|
3180
|
-
|
|
3208
|
+
twitter: z.optional(TwitterSchema),
|
|
3209
|
+
indexing: desc(z.optional(IndexingSchema), "How `vitops notify` tells search engines about a deploy: which sitemap, IndexNow key, Search Console property, and which pages to verify afterwards.")
|
|
3210
|
+
})), "SEO defaults: title/description templates, robots policy, verification tokens, Open Graph + Twitter cards, and post-deploy indexing notification."),
|
|
3181
3211
|
analytics: desc(z.optional(z.object({
|
|
3182
3212
|
googleAnalyticsId: z.optional(z.string()),
|
|
3183
3213
|
plausibleDomain: z.optional(z.string()),
|
|
@@ -3336,6 +3366,20 @@ function validateSite(input) {
|
|
|
3336
3366
|
if (resolvePrivacyContact(cfg) == null) errors.push(issue(["legal", "privacyPolicy"], "privacyPolicy.enabled requires a contact for privacy requests — set legal.privacyPolicy.privacyOfficer, contact, or organization.email/address"));
|
|
3337
3367
|
if (cfg.domains?.canonical == null) errors.push(issue(["legal", "privacyPolicy"], "privacyPolicy.enabled requires domains.canonical — the policy states where information is held"));
|
|
3338
3368
|
}
|
|
3369
|
+
const indexing = cfg.seo?.indexing;
|
|
3370
|
+
if (indexing != null && cfg.domains?.canonical == null) {
|
|
3371
|
+
if (indexing.sitemapUrl == null) errors.push(issue([
|
|
3372
|
+
"seo",
|
|
3373
|
+
"indexing",
|
|
3374
|
+
"sitemapUrl"
|
|
3375
|
+
], "seo.indexing needs domains.canonical to derive the sitemap URL — set one, or state sitemapUrl explicitly"));
|
|
3376
|
+
if (indexing.indexNow != null && indexing.indexNow.keyLocation == null) errors.push(issue([
|
|
3377
|
+
"seo",
|
|
3378
|
+
"indexing",
|
|
3379
|
+
"indexNow",
|
|
3380
|
+
"keyLocation"
|
|
3381
|
+
], "seo.indexing.indexNow needs domains.canonical to derive the key location — set one, or state keyLocation explicitly"));
|
|
3382
|
+
}
|
|
3339
3383
|
if (errors.length) return {
|
|
3340
3384
|
ok: false,
|
|
3341
3385
|
data: void 0,
|