Gap fixes: top-level searchSettings, public shouldLoadGoogle, consent/stats collection overrides

- ipalKit({ searchSettings }): switches off / reshapes Site Settings → Search & AI
  without `seo`; read as options.searchSettings ?? options.seo?.searchSettings.
- shouldLoadGoogle moved to a pure module (analytics/shouldLoadGoogle.ts) and
  exported from @intecion/ipal-kit and /client.
- consentLog.collectionOverrides and stats.collectionOverrides (object merges
  access/admin/hooks key by key, function takes over), via the new exported
  applyCollectionOverride / CollectionOverride. The stats view and dashboard
  chart now follow the stats-visits read access, so overrides narrow them too.

All additive; defaults unchanged. Docs: AGENT.md, ipal-reference, consent,
stats, seo, analytics, ipal-setup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-22 18:54:08 +02:00
co-authored by Claude Opus 5.5
parent 4911da7112
commit 5a07c42f76
22 changed files with 235 additions and 54 deletions
+3 -3
View File
@@ -1251,7 +1251,7 @@ Both are equally good for Google — it is about readability for humans, not SEO
## Search & AI — Search Console verification, AI bots, llms.txt note (1.13)
The **Site Settings → Search & AI** tab (on by default; empty fields change
nothing; `ipalKit({ seo: { …, searchSettings: false } })` removes it; the function
nothing; `ipalKit({ searchSettings: false })` removes it — also without `seo` (`seo: { searchSettings }` still works; the top-level option wins); the function
`searchSettings: (fields) => fields` gets the plugin's fields and returns your own — add, remove,
relabel; the helpers read the names `searchVerification` / `aiCrawlers` / `llmsIntro`):
@@ -1426,14 +1426,14 @@ It complements Markdown/llms: the assistant extracts the page's key content more
## Turn off, override, extend
- **Turn off the module:** leave out `seo` in `ipalKit()` — no SEO tab and no auto-fill. The Site Settings →
Search & AI tab stays (it is removed only by `seo: { searchSettings: false }`). The front helpers (`buildMetadata`, `buildRobots`, the JSON-LD builders) are plain functions and work without it.
Search & AI tab stays (remove it with the top-level `searchSettings: false`). The front helpers (`buildMetadata`, `buildRobots`, the JSON-LD builders) are plain functions and work without it.
- **Auto-fill:** `autoFill: false` turns it off; `autoFill: { title, description, content, descriptionLength }`
remaps the source fields. Skip it for one save with `context: { [SKIP_AUTO_FILL]: true }`.
- **Description hint:** `descriptionCheck: false` removes it; `descriptionCheck: { settingsSlug, siteDescriptionField }`
points it at another global/field.
- **Titles and descriptions:** `generateTitle` / `generateDescription` replace plugin-seo's generators;
`fields` adds your own fields to the SEO group. Per page, **Title Override** beats the composed title.
- **Search & AI tab:** `searchSettings: false` removes it; `searchSettings: (fields) => fields` adds, removes or
- **Search & AI tab:** `ipalKit({ searchSettings: false })` removes it (with or without `seo`); `searchSettings: (fields) => fields` adds, removes or
relabels fields (keep `searchVerification` / `aiCrawlers` / `llmsIntro`, or read your own fields in your routes).
- **The Site Settings global itself** (where the SEO fields live): `ipalKit({ globalOverrides: { 'site-settings': … } })`
— an object is merged over the plugin's global (`access`, `admin` and `hooks` key by key: your access rules win,