Docs: admin languages and texts, wording rule for agents, new screen names
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6b46bc0c14
commit
0a2374db18
+51
-35
@@ -62,7 +62,8 @@ Write new rules, AGENTS.md entries and plugin-gap reports in English.
|
||||
6. **A section = a composition of UI primitives.** `buildLinksField()` + `<CMSLink>`, upload +
|
||||
`<Media>`, `<Section>` + `<SectionHeader>`. No `ctaLabel`/`pdfUrl` fields.
|
||||
**A clear panel** (§6.5a): repeated items = an "+ Add …" array with `rowLabel`, never
|
||||
`cta1`/`cta2`; labels in English, short; no empty "just in case" fields.
|
||||
`cta1`/`cta2`; labels short and in the panel's languages (`{ en, pl }`, guide
|
||||
`docs/dev/admin-ux.md`); no empty "just in case" fields.
|
||||
7. **Renderers from the plugin:** `RenderBlocks` (not a `switch`), `RenderRichText` (not
|
||||
your own Lexical parser), `useForm` (not hand-made form plumbing).
|
||||
8. **No `any` and no `@ts-ignore`.** Types from `@/payload-types`, `unknown` + guard.
|
||||
@@ -96,21 +97,21 @@ site), **P** = a test in the panel. Full code: PROGRAMISTA.md §2.
|
||||
| # | Area | What must exist (file) | Plugin API | Check |
|
||||
|---|---|---|---|---|
|
||||
| 1 | i18n + routing | `src/proxy.ts`, `[locale]/[[...slug]]/page.tsx` = `createPageRoute(content, {…})` + a literal `revalidate`, `not-found.tsx` = `createNotFoundPage(content, { load })` + `notFoundView.ts` (`renderNotFoundView`) | `createProxy`, `createContentHelpers`, `createPageRoute`, `createNotFoundPage` (`/rsc`) | A, S |
|
||||
| 2 | **SEO** — meta | `generateMetadata` in every page route; favicon and OG from Site Settings; `htmlLimitedBots` in `next.config.ts`; SEO tab + `buildNoindexField` in Pages | `generatePageMetadata`, `buildIconsMetadata`, `buildNoindexField` | A, S |
|
||||
| 2 | **SEO** — meta | `generateMetadata` in every page route; favicon and OG from Site settings; `htmlLimitedBots` in `next.config.ts`; SEO tab + `buildNoindexField` in Pages | `generatePageMetadata`, `buildIconsMetadata`, `buildNoindexField` | A, S |
|
||||
| 3 | **SEO** — maps | `src/app/sitemap.xml/route.ts` (`export { sitemapRoute as GET }` + `force-dynamic`), `src/app/robots.ts` (`export { getRobots as default }` + `force-dynamic` — AI bots from the panel), `src/app/manifest.ts` — re-exports from `lib/content` | `sitemapRoute`, `getRobots` (or `robots` without the panel), `manifest` | A, S |
|
||||
| 3a | **Search Console / Bing** | recommended: **domain verification via DNS** (TXT record, deployment.md §6) — the plugin does nothing, the verification fields stay empty; only for URL-prefix verification: code in **Site Settings → Search & AI** (Google, Bing, Yandex), `generatePageMetadata` adds the `<meta>` itself; sitemap `https://<domain>/sitemap.xml` submitted in GSC and Bing | panel (optional), `verificationFrom` | P |
|
||||
| 4 | **SEO** — structured data | layout: `<SiteProviders shell={…}>` gives `WebSite` + `Organization` (`sameAs`) from Site Settings; local business → `createContentHelpers({ siteJsonLd })` with `buildLocalBusinessJsonLd` (`type`, hours → `formatOpeningHours`); navigation: `<SiteProviders jsonLd={[buildNavigationJsonLd(…)]}>`; page: `createPageRoute` adds `getPageJsonLd` (WebPage/BlogPosting, breadcrumbs, FAQ — `pageJsonLd: { faq }`) | `getSiteShell`, `SiteProviders`, `build*JsonLd`, `getPageJsonLd` | A, S |
|
||||
| 3a | **Search Console / Bing** | recommended: **domain verification via DNS** (TXT record, deployment.md §6) — the plugin does nothing, the verification fields stay empty; only for URL-prefix verification: code in **Site settings → Search engines** (Google, Bing, Yandex), `generatePageMetadata` adds the `<meta>` itself; sitemap `https://<domain>/sitemap.xml` submitted in GSC and Bing | panel (optional), `verificationFrom` | P |
|
||||
| 4 | **SEO** — structured data | layout: `<SiteProviders shell={…}>` gives `WebSite` + `Organization` (`sameAs`) from Site settings; local business → `createContentHelpers({ siteJsonLd })` with `buildLocalBusinessJsonLd` (`type`, hours → `formatOpeningHours`); navigation: `<SiteProviders jsonLd={[buildNavigationJsonLd(…)]}>`; page: `createPageRoute` adds `getPageJsonLd` (WebPage/BlogPosting, breadcrumbs, FAQ — `pageJsonLd: { faq }`) | `getSiteShell`, `SiteProviders`, `build*JsonLd`, `getPageJsonLd` | A, S |
|
||||
| 5 | **GEO** — llms | `src/app/llms.txt/route.ts` (`llmsRoute`) and `src/app/llms-full.txt/route.ts` (`llmsFullRoute`) from `lib/content`; the `buildSummaryField()` field in Pages, `summaryField: 'aiSummary'` in `createContentHelpers` | `llmsRoute`, `llmsFullRoute`, `buildSummaryField` | A, S |
|
||||
| 6 | **GEO** — Markdown | `src/app/md/[locale]/[[...slug]]/route.ts` (single-language: `src/app/md/[[...slug]]/route.ts`) = `export { markdownRoute as GET } from '@/lib/content'`; `createContentHelpers({ markdownAlternate: true })` (link in `<head>`); `createProxy(…, { NextResponse, markdown: true })` (without it `/md/…` gets redirected to a language) | `markdownRoute`, `markdownAlternate`, `createProxy({ markdown })` | A, S |
|
||||
| 7 | **GEO** — MCP | `src/app/api/mcp/route.ts` = `export { mcpGET as GET, mcpPOST as POST } from '@/lib/content'` (public — AI browses the site: `get_site_info`, `list_pages`, `search_content`, `get_page`); name: `createContentHelpers({ mcp: { serverName } })` | `mcpGET`, `mcpPOST` | A, S |
|
||||
| 8 | **GEO** — AI bots + IndexNow | robots **lets in** AI bots (default `aiBots: 'allow'`; block only on a client decision); AI bot policy and per-bot exceptions — Site Settings → Search & AI → AI crawlers (works only with `getRobots`); `ipalKit({ indexNow: true })` + `src/app/indexnow-key.txt/route.ts` (`indexNowKeyRoute`; publishing → Bing/ChatGPT Search within minutes; IndexNow sends nothing with `IPAL_NOINDEX=1`) | `buildRobots`, `getRobots`, `indexNowKeyRoute` | A, S |
|
||||
| 8 | **GEO** — AI bots + IndexNow | robots **lets in** AI bots (default `aiBots: 'allow'`; block only on a client decision); AI bot policy and per-bot exceptions — Site settings → Search engines → AI assistants (works only with `getRobots`); `ipalKit({ indexNow: true })` + `src/app/indexnow-key.txt/route.ts` (`indexNowKeyRoute`; publishing → Bing/ChatGPT Search within minutes; IndexNow sends nothing with `IPAL_NOINDEX=1`) | `buildRobots`, `getRobots`, `indexNowKeyRoute` | A, S |
|
||||
| 9 | **Media / R2 / speed** | `Media` with `focalPoint`, `normalizeFilenameHook`, `buildOptimizeUploadHook`, `buildMediaPlaceholderHook` + field; **always** `buildR2Storage(['media'], { s3Storage })` + `@payloadcms/storage-s3`; `R2_*` in `.env.example`; `<MediaPreconnect/>`; `images: buildImagesConfig()` and `buildUploadSecurityHeaders()` in `next.config.ts`; the project's `<Media>` via `mediaImageProps`/`videoProps` (§6.11b) | `buildR2Storage`, `mediaImageProps`, `videoProps`, `buildImagesConfig` | A, S |
|
||||
| 10 | **Forms** | every form from a **seed** (`scripts/seed-form-*.ts`: fields, confirmation, mail to the company **and** confirmation to the customer, every language); a block with `<RenderForm>` + `formClasses.ts` (look, once); `actions.ts` = `createSubmitAction({ getCachedPayload, headers })`; `forms: {…}` in `ipalKit`; `email: mailAdapter()` | `RenderForm` (`/rsc`), `createSubmitAction`, `mailAdapter` | A, P |
|
||||
| 11 | **Turnstile** | `<SiteProviders>` in `[locale]/layout.tsx` (wires `TurnstileProvider` with the key from the panel); `RenderForm` renders the widget; keys in Site Integrations | `SiteProviders`, `getTurnstileConfig`, `TurnstileProvider` | A, P |
|
||||
| 12 | Consent + analytics | Consent Mode: `'advanced'` (default — the Google tag loads at once with every signal `denied`) or `'basic'` (`<SiteProviders analytics={{ consentMode: 'basic' }}>` — no request to Google before consent; a client who wants zero requests), the choice goes to "Project decisions"; `ipalKit({ consentLog: true })` (without it the `/api/ipal/consent` endpoint does not exist) + `<SiteProviders logEndpoint="/api/ipal/consent" banner={<CookieBanner equalChoice settings="detailed" />}>` (ConsentProvider, banner, CookieButton, Analytics in the right order); settings window mode (`settings`: `inline` / `modal` / `detailed`) per the design, brief is silent → `detailed`, the decision goes to "Project decisions"; tool IDs in the panel; the cookie list from a scan (`cookieScanner: true` → *Cookie review* → **Scan cookies** → the editor accepts; or cookie-scan → import) — feeds `<CookieTable>` on the policy page **and** the lists in the `detailed` window; Cookie Settings → Detail labels in every language | consent.md, analytics.md | A, `ipal-consent-check` |
|
||||
| 11 | **Turnstile** | `<SiteProviders>` in `[locale]/layout.tsx` (wires `TurnstileProvider` with the key from the panel); `RenderForm` renders the widget; keys in Site integrations | `SiteProviders`, `getTurnstileConfig`, `TurnstileProvider` | A, P |
|
||||
| 12 | Consent + analytics | Consent Mode: `'advanced'` (default — the Google tag loads at once with every signal `denied`) or `'basic'` (`<SiteProviders analytics={{ consentMode: 'basic' }}>` — no request to Google before consent; a client who wants zero requests), the choice goes to "Project decisions"; `ipalKit({ consentLog: true })` (without it the `/api/ipal/consent` endpoint does not exist) + `<SiteProviders logEndpoint="/api/ipal/consent" banner={<CookieBanner equalChoice settings="detailed" />}>` (ConsentProvider, banner, CookieButton, Analytics in the right order); settings window mode (`settings`: `inline` / `modal` / `detailed`) per the design, brief is silent → `detailed`, the decision goes to "Project decisions"; tool IDs in the panel; the cookie list from a scan (`cookieScanner: true` → *Cookie review* → **Scan cookies** → the editor accepts; or cookie-scan → import) — feeds `<CookieTable>` on the policy page **and** the lists in the `detailed` window; Cookie banner → Settings window → Cookie list headings in every language | consent.md, analytics.md | A, `ipal-consent-check` |
|
||||
| 13 | Security | `buildSecurityHeaders` in `next.config.ts`; `twoFactor: { issuer, plugin: payloadTotp }`; CSP `report-only` → `enforce`; `IPAL_IP_HEADER` in production | security.md, forms.md | A |
|
||||
| 14 | Operations | `src/app/api/health/route.ts` (`healthRoute`); `src/instrumentation.ts` with `assertEnv(ipalEnvRules({ storage: true, ipHeader: true }))`; staging with `IPAL_NOINDEX=1`; smoke tests (§8a) | `healthRoute`, `assertEnv`, `ipalEnvRules` | A |
|
||||
| 15 | System pages | Site Settings → System Pages: homepage, 404, privacy policy, cookies; legal links in the footer by role (`getSystemLinks(locale)`) | `getSystemLinks`, `getSystemPagePath`, `getNotFoundPage` | P |
|
||||
| 15 | System pages | Site settings → System pages: homepage, 404, privacy policy, cookies; legal links in the footer by role (`getSystemLinks(locale)`) | `getSystemLinks`, `getSystemPagePath`, `getNotFoundPage` | P |
|
||||
| 16 | **Nothing hardcoded** | every text, link, image, file, company data from the panel; domains and keys from `.env` (§2) | — | A, P |
|
||||
| 17 | **Content** | one h1, the answer at the start of each section, facts, internal links, FAQ from real questions, `aiSummary`, sameAs, consistent company data (§0c) | — | S, P |
|
||||
| 18 | **Scaling** | `fluid.css` / `fluid-wide.css`, hero on `--ipal-hero-min-h`, the screen list in §6.11a (including 1366×768) | — | A, browser |
|
||||
@@ -132,9 +133,9 @@ Do not make the provider or the widget conditional in code — always wire them.
|
||||
| reCAPTCHA, hCaptcha, your own captcha | a second mechanism, no status in the panel | Turnstile from the plugin |
|
||||
| a hand-written `<script type="application/ld+json">` | no escaping, drifts from the panel | `JsonLdGraph` |
|
||||
| your own `sitemap.ts` / a text `robots.txt` in `public/` | no hreflang, noindex or system pages | `sitemapRoute`, `getRobots` from `lib/content` |
|
||||
| a verification `<meta>` / `google*.html` file in code or `public/` | a deploy for every change; the code belongs to the client | DNS verification, or the code in Site Settings → Search & AI |
|
||||
| a verification `<meta>` / `google*.html` file in code or `public/` | a deploy for every change; the code belongs to the client | DNS verification, or the code in Site settings → Search engines |
|
||||
| your own `llms.txt` in `public/` | static, goes stale | `llmsRoute` / `llmsFullRoute` from `lib/content` |
|
||||
| your own link function (`resolveHref`, `getHref`…): the homepage slug in code (`=== 'home'`), `` `/${slug}` `` | no language prefix, the homepage depends on Site Settings, `javascript:` from the panel in `href`, a dead link leads to `/` | `resolveLink(link, locale)` / `resolveNav` from `lib/content` (field: `buildLinkField`) |
|
||||
| your own link function (`resolveHref`, `getHref`…): the homepage slug in code (`=== 'home'`), `` `/${slug}` `` | no language prefix, the homepage depends on Site settings, `javascript:` from the panel in `href`, a dead link leads to `/` | `resolveLink(link, locale)` / `resolveNav` from `lib/content` (field: `buildLinkField`) |
|
||||
| `page` + `url` + `label` fields in globals, `prefooterButtonUrl`, `ctaLabel`; style based on content (`label === 'Tesla'`); legal link labels in code | the editor cannot choose a file / new tab / style; renaming breaks the look; Polish text in the English version | `buildLinkField` / `buildLinksField` with `appearances`, `resolveNav`, `getSystemLinks` |
|
||||
| `@aws-sdk/client-s3` / your own upload to the bucket | bypasses the media hooks and the URL from `R2_PUBLIC_URL` | `buildR2Storage` |
|
||||
|
||||
@@ -176,13 +177,13 @@ the panel (seed, phase 6 in ipal-site), apply the rules below — without invent
|
||||
- An **About us** page with people, experience, certificates (from the brief); posts with an author and a date.
|
||||
- **The same company data everywhere** (name, address, phone): footer, contact, JSON-LD
|
||||
(`LocalBusiness`/`Organization`), Google Business Profile. One Company global as the source.
|
||||
- **Site Settings → sameAs:** the company's profiles (Google Business Profile, LinkedIn, Facebook…).
|
||||
- **Site Settings → site description** (2–3 sentences: who, what, where) — feeds llms.txt, MCP and meta.
|
||||
- **Site settings → sameAs:** the company's profiles (Google Business Profile, LinkedIn, Facebook…).
|
||||
- **Site settings → site description** (2–3 sentences: who, what, where) — feeds llms.txt, MCP and meta.
|
||||
- **`aiSummary`** of important pages: fix the auto-fill when the summary is weak (1–3 sentences, facts).
|
||||
|
||||
### Meta in the SEO tab
|
||||
Title ≤ 60 characters, unique, key phrase first; description ≤ 155 characters, with specifics and a call to action;
|
||||
a share image (1200×630) on pages with an offer — the rest inherit the default from Site Settings.
|
||||
a share image (1200×630) on pages with an offer — the rest inherit the default from Site settings.
|
||||
A description **unique on every page** — an empty one is filled from the content on save, but a hand-written
|
||||
one is better. Google ignores the same description on many pages.
|
||||
|
||||
@@ -428,7 +429,7 @@ the editor composes pages from them. A new page = no code.
|
||||
|
||||
### 5.3 MINIMUM collections
|
||||
By default: `pages`, `media` + the plugin's globals (`site-settings`,
|
||||
`site-integrations`, Notifications, Cookie Settings) + the project's globals
|
||||
`site-integrations`, Notifications, Cookie banner) + the project's globals
|
||||
(navigation, footer, company). Nothing more until the client explicitly requires it.
|
||||
|
||||
**`users`** is added by `ipalKit` (an auth collection with `roles` and 2FA) — do not create it, unless
|
||||
@@ -460,7 +461,7 @@ Every content collection: `title`, `buildSlugField`, SEO tab, `buildNoindexField
|
||||
`trackSlugHistoryHook`, structured data if relevant (seo.md). Details: content.md.
|
||||
|
||||
### 5.5 System pages
|
||||
Site Settings → System Pages: `homepage`, `notFound` (404), `privacyPolicy`,
|
||||
Site settings → System pages: `homepage`, `notFound` (404), `privacyPolicy`,
|
||||
`cookiePolicy`, `termsOfService`. Link by role (`getSystemPagePath`),
|
||||
never by slug. pages.md.
|
||||
|
||||
@@ -480,7 +481,7 @@ Three problems that must never repeat: **a zoo of CTA fields** (`ctaLabel`,
|
||||
3. **Repeated items = an "+ Add …" array**, never numbered fields. Buttons: `buildLinksField()` →
|
||||
the editor clicks "Add Button" as many times as needed (`maxRows` = as many as the design fits).
|
||||
`cta1`/`cta2`/`cta3`, `feature1Title`…, `image2` = an audit error.
|
||||
4. **A panel readable without knowing the code:** English labels of 1–3 words, collapsed rows with content
|
||||
4. **A panel readable without knowing the code:** `{ en, pl }` labels of 1–3 words, collapsed rows with content
|
||||
(`rowLabel`), ≤ 6 items visible after adding a block, technical settings in the sidebar.
|
||||
5. **A variant instead of a copy:** a different look of the same section = `variant` (select), not a second block.
|
||||
6. **No text, link or image in JSX** — everything from the panel, in every language.
|
||||
@@ -523,7 +524,7 @@ before uploading — the hook only catches mistakes and asks for consent.
|
||||
- `buildSectionSettingsField()` → the `settings` group (sidebar): `anchor`, `background`
|
||||
(project backgrounds: `buildSectionSettingsField({ backgrounds: [{ label, value }] })`, extra fields: `fields`).
|
||||
Every section has `buildSectionSettingsField()` — no `bgColor`, `sectionId` per block.
|
||||
Field labels in English (the panel is in English).
|
||||
Field labels as `{ en, pl }` objects (the panel runs in English and Polish; §6.5a).
|
||||
|
||||
### 6.3 Layer 2 — UI primitives
|
||||
|
||||
@@ -611,11 +612,26 @@ empty fields, without guessing, without numbered slots. You design the schema fo
|
||||
2. **A row shows its content**: `admin: { initCollapsed: true, components: rowLabel('heading', 'Feature') }`
|
||||
→ collapsed rows "Fast delivery", "24/7 support" instead of "Feature 01".
|
||||
`buildLinksField` has this built in (row = button label).
|
||||
3. **The panel in English, short.** `label` 1–3 words, Sentence case ("Heading",
|
||||
"Background"); `admin.description` only when the label is not enough — one
|
||||
sentence ≤ 80 characters: what it does / where it shows, with a format example
|
||||
(`'Section id for #links, e.g. "pricing".'`), never how the code works. Select options
|
||||
with a readable `label` ("Inverted (dark)"), not the raw value.
|
||||
3. **The panel in the editors' languages, short — follow `docs/dev/admin-ux.md`**
|
||||
(`node_modules/@intecion/ipal-kit/docs/dev/admin-ux.md`): its glossary, sentence case,
|
||||
field order and tab / sidebar / collapsible rules.
|
||||
- Every visible field has an explicit `label` — never Payload's auto-label from the name
|
||||
(`ctaUrl` → "Cta Url"). Label 1–3 words, ≤ 30 characters.
|
||||
- Texts are `{ en: '…', pl: '…' }` (one key per admin language of the project):
|
||||
`label`, `admin.description`, option `label`, tab `label`, `labels.singular/plural`,
|
||||
`admin.group`. Type: `AdminText` from `@intecion/ipal-kit`.
|
||||
- `admin.description` only when the label is not enough — one sentence ≤ 120 characters:
|
||||
what it does / where it shows, with a format example (`'Section id for #links, e.g. "pricing".'`),
|
||||
never how the code works (no component, function, env-var or package names).
|
||||
- Select options with a readable `label` ("Inverted (dark)"), not the raw value.
|
||||
- The admin panel runs in English and Polish by default (ipal-kit sets
|
||||
`i18n.supportedLanguages` when the project has not); set your own list to change it.
|
||||
The plugin's own texts are overridable: field/global labels via `globalOverrides` /
|
||||
`collectionOverrides`, component texts via `i18n.translations.<lang>.ipal.<key>`
|
||||
(keys: `adminTexts` from `@intecion/ipal-kit`). Building blocks for your own admin
|
||||
components: `ipalT`, `formatNumber`, `formatDateTime`, `defineTexts`, `ADMIN_LANGUAGES`,
|
||||
`applyAdminI18n` (already applied by `ipalKit`), types `AdminText`, `AdminLanguage`, `AdminTextKey`
|
||||
— details in i18n.md "Admin panel languages and texts".
|
||||
4. **No "just in case" fields.** Every field is displayed by the component; an empty
|
||||
optional field = the element does not render (the component handles it). Hide
|
||||
dependent fields: `admin.condition` (video fields only with `mediaType: 'video'`,
|
||||
@@ -699,11 +715,11 @@ Skill: **ipal-nav**.
|
||||
- Navigation, footer, company data = **project globals** (`header`, `footer`, `company`),
|
||||
built with `buildLinkField` — the company data model depends on the country (NIP/ABN/EIN).
|
||||
- Menu: one level of submenu, no deeper. The CTA in the header = `links`.
|
||||
- Logo and name from Site Settings — do not duplicate the fields in Header.
|
||||
- Logo and name from Site settings — do not duplicate the fields in Header.
|
||||
- **Footer content in `<NoSnippet>`** (`/rsc`, inside `<footer>`) — otherwise Google shows the address
|
||||
from the footer as the description of every subpage. The same for the contact bar and a CTA repeated on
|
||||
every page. Never on `<main>`. Details: seo.md → "Descriptions in Google".
|
||||
- **Legal links in the footer** from the System Pages roles: `await getSystemLinks(locale)` (href + page title), not by hand and with no labels in code.
|
||||
- **Legal links in the footer** from the System pages roles: `await getSystemLinks(locale)` (href + page title), not by hand and with no labels in code.
|
||||
- Highlighting a menu item / a button variant = `appearance` from the panel (`buildLinkField({ appearances: [...] })`, any names), never a condition on content (`label === '…'`).
|
||||
- Resolve links **on the server**: `await resolveNav(header.navItems, locale)` from `lib/content`
|
||||
→ `{ href, label, internal, newTab, targetProps, children }[]` (dead links skipped); only this data
|
||||
@@ -711,9 +727,9 @@ Skill: **ipal-nav**.
|
||||
- a11y labels (menu button) — fields in the panel.
|
||||
- A global changed on every page → `afterChange: [buildGlobalRevalidateHook({ revalidatePath })]`
|
||||
(it calls `revalidatePath('/', 'layout')`). `buildRevalidateHook` is for collections. The plugin's globals
|
||||
(Site Settings, Site Integrations, Cookie Settings, Notifications) refresh ISR themselves once you pass
|
||||
(Site settings, Site integrations, Cookie banner, Notifications) refresh ISR themselves once you pass
|
||||
`ipalKit({ revalidatePath })` (from `next/cache`); without it the change shows after the `revalidate` window.
|
||||
- The plugin's globals: read public (Site Integrations: admin only), write editor+. Change their access, admin
|
||||
- The plugin's globals: read public (Site integrations: admin only), write editor+. Change their access, admin
|
||||
or hooks with `ipalKit({ globalOverrides: { notifications: { access: { update: authenticated } } } })` —
|
||||
an object merges key by key (your keys win), a function `(global) => global` takes over. Never copy a plugin global.
|
||||
- Only `[locale]/layout.tsx` fetches globals and passes them as props.
|
||||
@@ -742,7 +758,7 @@ Skill: **ipal-nav**.
|
||||
8. **An enlarged image is never a hand-made modal** (no `useState(index)` + `div role="dialog"`,
|
||||
`glightbox`, `photoswipe`, a link to the raw file in a new tab) — `<LightboxTrigger>` around the
|
||||
thumbnail (a client component you render from a server block with plain `lightboxImage(…)` data),
|
||||
one `<SiteProviders lightbox>`, labels from Notifications → Lightbox (lightbox.md). `ipal-audit`
|
||||
one `<SiteProviders lightbox>`, labels from Form messages → Image viewer (lightbox.md). `ipal-audit`
|
||||
warns about lightbox libraries and hand-made image dialogs.
|
||||
|
||||
### 6.10 Icons
|
||||
@@ -875,7 +891,7 @@ project → **plugin gap**, not a copy.
|
||||
| Unusual form markup | `BuilderForm renderField` / `useBuilderForm` (`/client`) | forms.md |
|
||||
| A field filled in by the page (product variant, category) | `RenderForm values` / `prepareBuilderForm` + `BuilderForm values` | forms.md |
|
||||
| Sending | `createSubmitAction({ getCachedPayload, headers })` (`/server`) | forms.md |
|
||||
| Message texts and step button texts | Notifications → `getFormTexts(locale)` | notifications.md |
|
||||
| Message texts and step button texts | Form messages → `getFormTexts(locale)` | notifications.md |
|
||||
| A form in the database | seed `ipal-form/resources/seed-form.template.ts` | forms.md, seeding.md |
|
||||
| Antispam / limit / IP | honeypot in `BuilderForm`, Turnstile from `SiteProviders` (`createSubmitAction({ turnstileHostnames })` pins the domain), `clientIp`, `setRateLimitStore`, `setUnknownIpFactor` | forms.md, turnstile.md |
|
||||
| GTM event after sending | `buildFormAnalyticsFields` (panel) — `RenderForm` sends it itself | forms.md |
|
||||
@@ -886,7 +902,7 @@ project → **plugin gap**, not a copy.
|
||||
|---|---|---|
|
||||
| Metadata, canonical, hreflang, OG, X | `generatePageMetadata` (`createPageRoute` does it itself) | seo.md |
|
||||
| sitemap / robots / manifest | `sitemapRoute` (splits into a sitemap index above 10 000 URLs; `sitemapOptions`, `sitemapEntries`), `getRobots` (panel) / `robots` (code only), `manifest` | seo.md |
|
||||
| Search Console / Bing verification, AI crawler policy, llms.txt note | Site Settings → Search & AI (`searchSettings`); building blocks `verificationFrom`, `robotsOptionsFrom` | seo.md |
|
||||
| Search Console / Bing verification, AI crawler policy, llms.txt note | Site settings → Search engines (`searchSettings`); building blocks `verificationFrom`, `robotsOptionsFrom` | seo.md |
|
||||
| JSON-LD | `getSiteShell().jsonLd`, `getPageJsonLd`, `build*JsonLd`, `formatOpeningHours`, `sameAsUrls`, `<JsonLdGraph>` | seo.md |
|
||||
| Product / category JSON-LD (an entry that is not an article) | `pageJsonLd.entries` + `buildProductJsonLd` | seo.md |
|
||||
| llms.txt / llms-full / Markdown / MCP | `llmsRoute`, `llmsFullRoute`, `markdownRoute`, `mcpGET`/`mcpPOST`; `markdownAlternate: true`; `createProxy({ markdown: true })` | seo.md, content.md, mcp.md |
|
||||
@@ -898,7 +914,7 @@ project → **plugin gap**, not a copy.
|
||||
|---|---|---|
|
||||
| R2, file names, optimization, preview | `buildR2Storage`, `normalizeFilenameHook`, `buildOptimizeUploadHook`, `buildMediaPlaceholderHook` | storage.md |
|
||||
| Image / video in `<Media>` | `mediaImageProps`, `videoProps`, `MEDIA_SIZES` | storage.md |
|
||||
| Enlarge an image (card, gallery, product, rich text) | `<SiteProviders lightbox>` + `<LightboxTrigger group image={lightboxImage(media, { size })}>` (`/client`), `RenderRichText lightbox`, `useLightbox`; labels: `ipalKit({ lightbox: true })` → Notifications → Lightbox | lightbox.md |
|
||||
| Enlarge an image (card, gallery, product, rich text) | `<SiteProviders lightbox>` + `<LightboxTrigger group image={lightboxImage(media, { size })}>` (`/client`), `RenderRichText lightbox`, `useLightbox`; labels: `ipalKit({ lightbox: true })` → Form messages → Image viewer | lightbox.md |
|
||||
| YouTube without cookies before a click | `<YouTubeEmbed>` (`/client`) | storage.md |
|
||||
| `next.config` | `buildImagesConfig`, `buildSecurityHeaders`, `buildCsp`, `buildUploadSecurityHeaders` | storage.md, security.md |
|
||||
| Fluid typography and spacing | `fluid.css` / `fluid-wide.css` (`--ipal-*` variables) | PROGRAMISTA §2.5 |
|
||||
@@ -919,7 +935,7 @@ project → **plugin gap**, not a copy.
|
||||
| Rate limit (forms, MCP, search) | built in; IP from `IPAL_IP_HEADER`; several instances → `setRateLimitStore` | forms.md |
|
||||
|
||||
**Compliance (PL/EU) — the mechanism from the plugin, the content from the client:** policy pages
|
||||
as System Pages, `CookieBanner` + `CookieButton`, a `consent` checkbox in
|
||||
as System pages, `CookieBanner` + `CookieButton`, a `consent` checkbox in
|
||||
forms (enforced server-side), the controller's data in a global, the cookie
|
||||
table from the panel (`<CookieTable>` and the `settings="detailed"` window, scan: ipal-consent-check). You do not write legal texts. An accessibility widget — only when the client
|
||||
requires it (accessibility.md).
|
||||
@@ -932,10 +948,10 @@ payloadTotp } })`, never `twoFactor: false` without a client decision). CSP: fir
|
||||
|
||||
| Feature (default) | Turn off | Override / building blocks |
|
||||
|---|---|---|
|
||||
| Plugin globals: write editor+ (Site Integrations: admin) | — | `ipalKit({ globalOverrides: { <slug>: { access, admin, hooks } } })`; a function `(global) => global` takes over (`applyGlobalOverrides`) |
|
||||
| Plugin globals: write editor+ (Site integrations: admin) | — | `ipalKit({ globalOverrides: { <slug>: { access, admin, hooks } } })`; a function `(global) => global` takes over (`applyGlobalOverrides`) |
|
||||
| Global saves revalidate the layout (with `ipalKit({ revalidatePath })`) | omit `revalidatePath`; once: `context: { disableRevalidate: true }` | `buildGlobalRevalidateHook` on your own globals |
|
||||
| Staff features without `access` (no roles field): every logged-in account passes (`userMeetsRole`) | add `access` (roles decide) | `globalOverrides`, `forms.formSubmissionOverrides`, `consentLog.collectionOverrides`, `stats.collectionOverrides` |
|
||||
| Cookie crawl (`crawl`): start editor+ or the token, results token-only for the running job, latest result only, dashboard warning on, e-mail off until recipients are set | omit `crawl`; `crawl.dashboard: false` | `crawl.serviceUrl` / `token` / `siteUrl` / `maxPages` / `acceptSelector` / `consentMode` / `trackerHosts` / `globalOverride`; *Cookie crawl → E-mail warnings to*; building blocks `ingestCrawlResult`, `findCrawlViolations`, `parseCrawlResult` |
|
||||
| Cookie check (`crawl`): start editor+ or the token, results token-only for the running job, latest result only, dashboard warning on, e-mail off until recipients are set | omit `crawl`; `crawl.dashboard: false` | `crawl.serviceUrl` / `token` / `siteUrl` / `maxPages` / `acceptSelector` / `consentMode` / `trackerHosts` / `globalOverride`; *Cookie check → Warning e-mails to*; building blocks `ingestCrawlResult`, `findCrawlViolations`, `parseCrawlResult` |
|
||||
| Cookie review: scan + review editor+, delete admin; Open Cookie Database "Functional" → `functional` | omit `cookieScanner` | `cookieScanner.access`, `collectionOverrides`, `databaseCategories`, `integrations`, `declarations`, `labels`, `syncAccepted: false`; building blocks `runCookieScan`, `collectCookieFindings`, `applyCookieFindings` |
|
||||
| Consent records / stats visits: read and delete admin (stats view and chart follow `stats-visits` read access) | omit `consentLog` / `stats` | `consentLog.collectionOverrides`, `stats.collectionOverrides` (object merges `access`/`admin`/`hooks`, function takes over; `applyCollectionOverride`) |
|
||||
| Injected `users`: admin manages everyone, others only themselves | — | `access.authAccess` (your keys win); your own `users` collection wins whole |
|
||||
@@ -951,7 +967,7 @@ payloadTotp } })`, never `twoFactor: false` without a client decision). CSP: fir
|
||||
| `getSettings` at `depth: 1` | — | `createContentHelpers({ settingsDepth: 2 })` (every request pays) |
|
||||
| Image lightbox (off) | — (opt-in: `<SiteProviders lightbox>`, `LightboxTrigger`, `RenderRichText lightbox`, `ipalKit({ lightbox: true })` for panel labels) | `texts`, `classNames`, `unstyled`, `--ipal-lightbox-*` variables, `renderImage`, `renderDialog`, `loop`, `useLightbox`, `withLightboxUploads`, `lightboxImage` |
|
||||
| `RenderRichText` renders unsafe link URLs as `#` | `safeLinks={false}` (fully trusted content only) | your own `converters` |
|
||||
| Search & AI tab in Site Settings | `searchSettings: false` (top level, works without `seo`; `seo.searchSettings` still works) | `searchSettings: (fields) => fields`; `verificationFrom`, `robotsOptionsFrom` |
|
||||
| Search engines tab in Site settings | `searchSettings: false` (top level, works without `seo`; `seo.searchSettings` still works) | `searchSettings: (fields) => fields`; `verificationFrom`, `robotsOptionsFrom` |
|
||||
| Verification `<meta>` from the panel | empty fields = no tag | `const { verification, ...meta } = await generatePageMetadata(…)` |
|
||||
| AI crawler policy from the panel | `robots` instead of `getRobots`; policy `default` | `buildRobots({ ...robotsOptionsFrom(settings), aiBotRules })`; `AI_ASSISTANT_BOTS`, `AI_TRAINING_BOTS` |
|
||||
| Sitemap split / CDN cache / memo | `sitemapOptions: { maxUrls: Infinity, cacheControl: false, memoSeconds: 0 }` | `sitemapEntries`, `createSitemapRouteHandler`, `buildSitemapIndexXml`, `buildSitemapEntries` |
|
||||
@@ -980,7 +996,7 @@ Rules:
|
||||
texts the editor will change tomorrow.
|
||||
- **Every fixed bug = a test** that would have caught it (smoke or vitest), so it does not come back.
|
||||
- **Test the form for real**: sending → a record in Form Submissions → mail to the company **and**
|
||||
confirmation to the customer (locally: Site Integrations → Send test + adapter logs).
|
||||
confirmation to the customer (locally: Site integrations → Send test + adapter logs).
|
||||
- **Do not test the plugin in the project** (e.g. whether `submitForm` validates) — ipal-kit does that. When
|
||||
the plugin's behavior is wrong: plugin gap.
|
||||
- Tests in the project's CI: types + audit `--quick` + build on every push; smoke on staging
|
||||
|
||||
Reference in New Issue
Block a user