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:
Radosław Smoliński
2026-10-27 15:46:25 +01:00
co-authored by Claude Opus 5.5
parent 6b46bc0c14
commit 0a2374db18
45 changed files with 443 additions and 360 deletions
+24 -24
View File
@@ -160,12 +160,12 @@ export default buildConfig({
ipalKit({
i18n: i18nConfig,
access: { authCollection: 'users' },
pages: { slug: 'pages' }, // System Pages (homepage, 404, policies)
pages: { slug: 'pages' }, // System pages (homepage, 404, policies)
content: contentConfig, // collections with an archive (blog…), optional
seo: { collections: ['pages'] },
forms: { redirectRelationships: ['pages'] },
twoFactor: { issuer: 'Nazwa Klienta', plugin: payloadTotp },
whiteLabel: true, // logo/name from Site Settings in the admin panel
whiteLabel: true, // logo/name from Site settings in the admin panel
indexNow: true, // publish → Bing / ChatGPT Search (production)
consentLog: true, // proof of consent (GDPR Art. 7(1)), no personal data
// adminRoute: '/its', // + move app/(payload)/admin → its and put `its` in the proxy matcher (§2.6)
@@ -288,7 +288,7 @@ type Props = { children: React.ReactNode; params: Promise<{ locale: string }> }
export default async function LocaleLayout({ children, params }: Props) {
const { locale } = await params
if (!(await getConfiguredLocales()).includes(locale)) notFound()
const shell = await getSiteShell(locale) // consent, analytics, Turnstile, site JSON-LD, Site Settings
const shell = await getSiteShell(locale) // consent, analytics, Turnstile, site JSON-LD, Site settings
return (
<html lang={locale}>
{/* NO <head> — Next manages it itself */}
@@ -304,7 +304,7 @@ export default async function LocaleLayout({ children, params }: Props) {
}
```
`SiteProviders` wires things in the right order: `MediaPreconnect`, `JsonLdGraph` (WebSite + Organization
from Site Settings), `ConsentProvider` → `TurnstileProvider` (always — it turns itself off without keys) →
from Site settings), `ConsentProvider` → `TurnstileProvider` (always — it turns itself off without keys) →
banner, `CookieButton`, `Analytics` (inside consent). It adds no markup. You can change or
turn off every part: `banner={<CookieBanner classNames={…} />}` / `false`, `cookieButton`,
`analytics={{ defer: true }}` / `false`, `jsonLd={[buildNavigationJsonLd(…)]}`, `cookieMap`,
@@ -312,7 +312,7 @@ turn off every part: `banner={<CookieBanner classNames={…} />}` / `false`, `co
Pick the consent settings window with the banner's `settings` prop: `'inline'` (default — categories in the bar),
`'modal'` (small window in the center) or `'detailed'` (large window: each category with a switch, a description and
an expandable list of cookies from Cookie Settings → Cookies). Example:
an expandable list of cookies from Cookie banner → Cookie list). Example:
`banner={<CookieBanner equalChoice controls="switch" settings="detailed" />}` — description: consent.md, the
`settings="detailed"` section.
@@ -367,7 +367,7 @@ export default createNotFoundPage(content, { load: loadNotFoundView })
export { sitemapRoute as GET } from '@/lib/content'
export const dynamic = 'force-dynamic'
// src/app/robots.ts — robots from code + the AI crawler policy from Site Settings → Search & AI
// src/app/robots.ts — robots from code + the AI crawler policy from Site settings → Search engines
export { getRobots as default } from '@/lib/content'
export const dynamic = 'force-dynamic'
@@ -384,7 +384,7 @@ export const dynamic = 'force-dynamic'
export { markdownRoute as GET } from '@/lib/content'
export const dynamic = 'force-dynamic'
// src/app/indexnow-key.txt/route.ts — IndexNow key (from Site Integrations or INDEXNOW_KEY)
// src/app/indexnow-key.txt/route.ts — IndexNow key (from Site integrations or INDEXNOW_KEY)
export { indexNowKeyRoute as GET } from '@/lib/content'
export const dynamic = 'force-dynamic'
@@ -429,14 +429,14 @@ pnpm dev
### 2.11 Configuration in the admin panel (`/admin`)
1. First user (admin) + 2FA setup.
2. **Site Settings → General** — site name, logo, favicon (PNG).
2. **Site settings → General** — site name, logo, favicon (PNG).
3. **Pages** — the homepage with a title **in every language** (empty EN slug = 404 on `/en`).
4. **Site Settings → System Pages** — Homepage (without it `/pl` → 404), 404,
4. **Site settings → System pages** — Homepage (without it `/pl` → 404), 404,
policies; archives of content collections.
5. **Cookie Settings** — banner texts per language; **Cookies** (list from the scan, `ipal-consent-check`) and **Detail
5. **Cookie banner** — banner texts per language; **Cookies** (list from the scan, `ipal-consent-check`) and **Detail
labels** (captions of the list in the `settings="detailed"` window) — also in every language.
6. **Notifications** — form messages per language.
7. **Site Integrations** — SMTP/Graph (From Name, From Address), Turnstile, analytics/pixel
7. **Site integrations** — SMTP/Graph (From Name, From Address), Turnstile, analytics/pixel
IDs, IndexNow (integrations.md). Mail / Turnstile problems show as an alert on the
dashboard and a banner on the tab.
@@ -457,7 +457,7 @@ pnpm dev
| `R2_PUBLIC_URL` | ⬜ | **empty by default** — media served through the app (`/api/media/file/…`); a media domain whose zone is on Cloudflare only for media-heavy sites (storage.md, deployment.md §6); in dev alone = read-only media |
| `NODE_ENV` | ⬜ | `development` / `production` / `test` — `production` tightens the `ipalEnvRules` rules (R2, `IPAL_IP_HEADER`) |
| `IPAL_NOINDEX` | ⬜ | `1` **only on staging / preview** — the whole site out of Google (robots, meta, header) |
| `INDEXNOW_KEY` | ⬜ | IndexNow key, when not set in the admin panel (Site Integrations → IndexNow generates one itself) |
| `INDEXNOW_KEY` | ⬜ | IndexNow key, when not set in the admin panel (Site integrations → IndexNow generates one itself) |
| `IPAL_IP_HEADER` | ✅ prod | header with the real IP for the rate limit: `cf-connecting-ip` behind Cloudflare, `x-forwarded-for` behind plain Traefik/nginx (forms.md) |
| `NEXT_PUBLIC_TURNSTILE_SITE_KEY`, `TURNSTILE_SECRET_KEY` | ⬜ | fallback when the Turnstile keys are not in the admin panel (`ipalEnvRules({ turnstile: true })` makes them required) |
@@ -545,7 +545,7 @@ Test without a database: `DATABASE_URI=mongodb://invalid-host:27017/x pnpm build
### 4.6 Email — SMTP or Graph
Client on M365/Exchange → Graph (SMTP AUTH is often turned off). Own SMTP/Gmail →
SMTP. The switch is in the admin panel (Site Integrations → SMTP → Email Transport).
SMTP. The switch is in the admin panel (Site integrations → SMTP → Email Transport).
Graph, one-time: App registration in Azure, the `Mail.Send` application permission
+ **Grant admin consent**, the `GRAPH_*` variables. `from.address` always =
`GRAPH_SENDER` (otherwise `ErrorSendAsDenied`); sender name from the admin panel; the
@@ -559,7 +559,7 @@ visitor's address goes into `replyTo`. More: email.md.
the policies and terms — we are not a law firm. Put this in the contract.
- [ ] Policy pages created (privacy, cookies, terms if there are services/sales/accounts)
- [ ] Roles assigned in System Pages; content filled in (not a placeholder); `noindex` on policies
- [ ] Roles assigned in System pages; content filled in (not a placeholder); `noindex` on policies
- [ ] The banner shows on the first visit; "Reject" is as easy as "Accept"
- [ ] Pixels (Meta, LinkedIn, TikTok) and Clarity do **not** load before consent (check Network).
GA4/GTM load right away in Consent Mode v2 with default `denied` (advanced mode:
@@ -610,10 +610,10 @@ Do one item at a time, build, check. Order by importance:
| 15j | the form front end sends `fetch('/api/form-submissions')` (from this version REST returns 403 for anonymous users) | rewrite as a server action + `submitForm` (skill `ipal-form`) | forms.md |
| 15k | Turnstile secret saved by code (`updateGlobal` in `onInit` / an action) or own `verify` without `remoteip` | delete the workaround: secret in the admin panel or env `TURNSTILE_SECRET_KEY`; the plugin does not send `remoteip` and logs the rejection reason | turnstile.md |
| 15l | a Turnstile outage blocked forms | nothing in the project: on an error on our side the plugin accepts the submission and shows an alert in the admin panel; `generate:importmap`, Postgres: `migrate:create` | turnstile.md |
| 15m | own plugin moving Notifications into a group; `formOverrides`/`formSubmissionOverrides` only for labels and the admin group | delete — the plugin itself puts Notifications → Settings, and forms → the "Forms" group with labels (`forms.adminGroup`) | forms.md |
| 15n | mail errors visible only in logs | nothing in the project: `mailAdapter()` shows the send error on the dashboard and in Site Integrations → SMTP; `generate:importmap`, Postgres: `migrate:create` | email.md |
| 16 | Hard-coded 404 | 404 role in System Pages + `getNotFoundPage` | pages.md |
| 16a | `privacyPolicy: { label: 'Polityka prywatności', … }` in the layout | delete the whole parameter; enter the text in Cookie Settings → Privacy link label | consent.md |
| 15m | own plugin moving Notifications into a group; `formOverrides`/`formSubmissionOverrides` only for labels and the admin group | delete — the plugin itself puts Form messages → Settings, and forms → the "Forms" group with labels (`forms.adminGroup`) | forms.md |
| 15n | mail errors visible only in logs | nothing in the project: `mailAdapter()` shows the send error on the dashboard and in Site integrations → SMTP; `generate:importmap`, Postgres: `migrate:create` | email.md |
| 16 | Hard-coded 404 | 404 role in System pages + `getNotFoundPage` | pages.md |
| 16a | `privacyPolicy: { label: 'Polityka prywatności', … }` in the layout | delete the whole parameter; enter the text in Cookie banner → Privacy link label | consent.md |
| 17 | **AI/GEO (mandatory since 1.9.0)** | llms.txt + llms-full.txt, the `/md/…` route, `markdownAlternate: true`, `prefersMarkdown` in the proxy, `/api/mcp`, `buildSummaryField`, AI bots allowed — AGENT.md §0b | content.md, seo.md, mcp.md |
| 18 | **1.9.0** — `TurnstileProvider siteKey` from `getSiteIntegrations(…).turnstileSiteKey` | `getTurnstileConfig(payload).siteKey`. Note: with both keys set `submitForm` **requires** a token — a form without the widget will be rejected | turnstile.md |
| 19 | **1.9.0** — `twoFactor: { issuer }` without `plugin` | add `plugin: payloadTotp` (the fallback with a dynamic import was removed — startup fails with an error) | security.md |
@@ -622,11 +622,11 @@ Do one item at a time, build, check. Order by importance:
| 22 | **1.9.1** — hand-written `actions.ts` / `md` route / no form seed | `createSubmitAction`, `createMarkdownRoute`, seed from `ipal-form` (mail to the company + to the visitor) | forms.md, content.md |
| 23 | **1.9.1** — `createProxy` without `markdown: true` | add it — otherwise `/md/…` redirects to `/pl/md/…` | content.md |
| 24 | **1.9.1** — page JSON-LD assembled by hand | `getPageJsonLd`, `buildNavigationJsonLd`, `sameAsUrls`, `formatOpeningHours` | seo.md |
| 25 | **1.9.1** — consent: version, log, table | Cookie Settings → Policy version; `consentLog: true` + `logEndpoint`; `<CookieBanner equalChoice>`; scan + `<CookieTable>`; Postgres: `migrate:create` | consent.md |
| 25 | **1.9.1** — consent: version, log, table | Cookie banner → Policy version; `consentLog: true` + `logEndpoint`; `<CookieBanner equalChoice>`; scan + `<CookieTable>`; Postgres: `migrate:create` | consent.md |
| 26 | **1.9.1** — media: `priority`, no placeholders, `images` in next.config | `<Media>` through `mediaImageProps`/`videoProps`, `buildMediaPlaceholderHook`, `buildImagesConfig`, `buildUploadSecurityHeaders` | media.md, storage.md |
| 27 | **1.9.1** — staging indexed | `IPAL_NOINDEX=1` in the staging env | seo.md |
| 28 | **1.9.2** — own `FormRenderer` (a copy of the engine on `useForm`) | **security:** it passed the whole form document, including the Emails tab, to the browser (company addresses in the HTML). Block → `<RenderForm form action locale texts classNames>`, styling into `formClasses.ts`, delete `FormRenderer.tsx`; unusual form → `useBuilderForm` | forms.md |
| 29 | **1.9.2** — multi-step forms / choice lists built in code | admin panel: the **Step**, **Radio**, **Checkbox group**, **Date** blocks; Notifications → next / back / stepOf; Postgres: `migrate:create` | forms.md |
| 29 | **1.9.2** — multi-step forms / choice lists built in code | admin panel: the **Step**, **Radio**, **Checkbox group**, **Date** blocks; Form messages → next / back / stepOf; Postgres: `migrate:create` | forms.md |
| 30 | **1.9.2** — layout assembled by hand (ConsentProvider, TurnstileProvider, Analytics, JsonLdGraph, MediaPreconnect) | `<SiteProviders shell={await getSiteShell(locale)} …>` — the same options (banner, analytics, jsonLd, logEndpoint) | PROGRAMISTA §2.8 |
| 31 | **1.9.2** — catch-all page and `not-found.tsx` written by hand | `createPageRoute(content, {…})` / `createNotFoundPage(content, {…})` from `/rsc`; `revalidate` stays a literal | pages.md |
| 32 | **1.9.2** — llms/md/mcp/health/indexnow/manifest routes with configuration in every file | re-export from `lib/content` (`llmsRoute`, `llmsFullRoute`, `markdownRoute`, `mcpGET`/`mcpPOST`, `healthRoute`, `indexNowKeyRoute`, `manifest`); `summaryField`, `mcp` once in `createContentHelpers` | PROGRAMISTA §2.7 |
@@ -643,9 +643,9 @@ Do one item at a time, build, check. Order by importance:
| 43 | **1.11.1** — `<Media>` sets the background color only for JPEG | delete the condition — `mediaImageProps` does it itself (`placeholderColor`) | media.md |
| 44 | **1.11.1** — `CmsLink['appearance']` replaced with an own type because the type depended on field order | types per shape: `CmsLink`, `CmsLinkPlain`, `CmsLinkNoLabel`; `pnpm generate:types` and fix the imports | links.md |
| 45 | **1.11.1** — format description in a form field label / time as text | the **Placeholder** field in the admin panel, the **Time** type; Postgres: `migrate:create` | forms.md |
| 46 | **1.12.3** — own cookie settings window / cookie list in the banner written in the project | `<CookieBanner settings="detailed">` (list from Cookie Settings → Cookies, captions: Detail labels); delete your own version; Postgres: `migrate:create` | consent.md |
| 47 | **1.13.0** — staff access, Search & AI, seed scripts, workarounds around plugin globals | without `access`: every logged-in account gets the staff features → `access` or `globalOverrides` / `formOverrides` / `formSubmissionOverrides` / `collectionOverrides`; with `access`: staff need `editor`/`admin`; Postgres: `migrate:create`; check `settingsDepth`, `sitemap()` throwing, 2FA slug, client IP; own seed code → `@intecion/ipal-kit/seed`; global hooks/access plugins → `revalidatePath` / `globalOverrides` | CHANGELOG 1.13.0, AGENT.md §7.1, seo.md, seeding.md |
| 48 | **image lightbox** (release after 1.13.0) — own image modal (`useState(index)` + `div role="dialog"`), `glightbox` / other lightbox library, thumbnails linking to the raw file in a new tab | `ipalKit({ lightbox: true })` + Postgres `migrate:create`; `<SiteProviders lightbox>`; `<LightboxTrigger group image={lightboxImage(media, { size })}>` around the thumbnail; delete the old dialog and `pnpm remove glightbox`; old label fields → Notifications → Lightbox | lightbox.md → "Replacing a hand-made modal" |
| 46 | **1.12.3** — own cookie settings window / cookie list in the banner written in the project | `<CookieBanner settings="detailed">` (list from Cookie banner → Cookie list, captions: Detail labels); delete your own version; Postgres: `migrate:create` | consent.md |
| 47 | **1.13.0** — staff access, Search engines, seed scripts, workarounds around plugin globals | without `access`: every logged-in account gets the staff features → `access` or `globalOverrides` / `formOverrides` / `formSubmissionOverrides` / `collectionOverrides`; with `access`: staff need `editor`/`admin`; Postgres: `migrate:create`; check `settingsDepth`, `sitemap()` throwing, 2FA slug, client IP; own seed code → `@intecion/ipal-kit/seed`; global hooks/access plugins → `revalidatePath` / `globalOverrides` | CHANGELOG 1.13.0, AGENT.md §7.1, seo.md, seeding.md |
| 48 | **image lightbox** (release after 1.13.0) — own image modal (`useState(index)` + `div role="dialog"`), `glightbox` / other lightbox library, thumbnails linking to the raw file in a new tab | `ipalKit({ lightbox: true })` + Postgres `migrate:create`; `<SiteProviders lightbox>`; `<LightboxTrigger group image={lightboxImage(media, { size })}>` around the thumbnail; delete the old dialog and `pnpm remove glightbox`; old label fields → Form messages → Image viewer | lightbox.md → "Replacing a hand-made modal" |
After updating the package: `pnpm ipal:skills` (new skill versions), `pnpm payload generate:importmap`, `rm -rf .next`, restart dev, grep for the new symbol in
`node_modules/@intecion/ipal-kit/dist`.
@@ -668,7 +668,7 @@ After updating the package: `pnpm ipal:skills` (new skill versions), `pnpm paylo
| Banner without styles | no Tailwind or no `@source` for the plugin |
| `/admin`, `/_next` → 500 | the proxy matcher is not an inline literal |
| `slug.join is not a function` | `[slug]` instead of `[[...slug]]` |
| `/pl` → 404 | Homepage not assigned in System Pages |
| `/pl` → 404 | Homepage not assigned in System pages |
| `/en/*` → 404, `/pl/*` works | empty title/slug in EN |
| `Missing <html> and <body>` | root layout deleted, and `[locale]/layout.tsx` does not have them |
| Routes `ƒ` despite `generateStaticParams` | the build does not see the database (§4.3) |