Merge main (security-perf + SEO) into docs; finish English docs and agent guide

- Resolve conflicts in analytics, consent, content, i18n, mcp and stats,
  keeping the docs fixes and the new code behaviour, verified against src
- Translate the remaining 14 module pages, ipal-seo-check skill and script
- Integrate the security-perf and SEO agent-guide text: getRobots,
  isPathVisible, Search & AI (DNS verification first, meta fields optional),
  sitemap index/cache/503, consentMode basic/advanced, policyVersion,
  globalOverrides, revalidatePath / buildGlobalRevalidateHook, authAccess,
  firstUserAdmin, allowCollectionMismatch, unknown-IP rate limit; stale
  claims fixed across AGENT.md, skills, frontend, developer guide, vibe
- docsConsistency: pending list removed (all docs English); relative links
  now also check #anchors

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-22 17:59:52 +02:00
co-authored by Claude Opus 5.5
107 changed files with 5476 additions and 2541 deletions
+7 -3
View File
@@ -145,9 +145,10 @@ See [proxy in this section](#proxy-formerly-middleware) below.
| `consentCategory` | `'functional'` | consent category required to write the language cookie; `'necessary'` = always write |
| `consentCookieName` | `CONSENT_COOKIE` | consent cookie to read |
| `cookieName` | `NEXT_LOCALE` | language cookie name |
| `policyVersion` | — (version stored in the consent cookie) | consent policy version required to write the language cookie (see [below](#locale-cookie-and-consent-gdpr)) |
The language cookie is set with `path: '/'`, `sameSite: 'lax'` and **no `maxAge`** — it is
a session cookie; the browser deletes it on close (`src/modules/i18n/createProxy.ts` ~106).
a session cookie; the browser deletes it on close (`src/modules/i18n/createProxy.ts` ~108).
The redirect is 307 (the default `NextResponse.redirect`).
```ts
@@ -192,7 +193,10 @@ writing it requires consent: it is a **functional** category cookie, so:
- **Write ONLY with consent.** The middleware writes `NEXT_LOCALE` only when
the user has consented to the functional category (`mayPersistLocale` checks
consent). Without consent the language works per request (negotiated from Accept-Language),
but is not persisted.
but is not persisted. The proxy does not know the policy version set in the admin panel, so
consent counts in the version it was saved with (after you bump the version, the language is
still saved). To require a version: `createLocaleMiddleware({ policyVersion })` /
`createProxy(config, { policyVersion, … })`.
- **Cleanup after consent is withdrawn.** When the user withdraws functional consent,
the `NEXT_LOCALE` cookie is deleted automatically (consent knows this cookie through
`DEFAULT_COOKIE_MAP` — see [consent.md](./consent.md)).
@@ -375,6 +379,6 @@ about the matcher — paste it inline. This is a Next limitation, not a plugin o
- `i18n` is required — the module cannot be turned off; one language = mode without the `/pl` prefix.
- `config.localization` is currently always overridden from `i18n` (your own `localization` in payload.config does not survive); `fallback: false` turns off Payload's fallback.
- Proxy: `createProxy` with options (`consentCategory`, `cookieName`, `exposeHeaders`, `markdown`) or your own proxy on `createLocaleMiddleware` + `negotiateLocale` / `matchAcceptLanguage`.
- Proxy: `createProxy` with options (`consentCategory`, `cookieName`, `exposeHeaders`, `markdown`, `policyVersion`) or your own proxy on `createLocaleMiddleware` + `negotiateLocale` / `matchAcceptLanguage`.
- Switcher: `LanguageSwitcher` (`classNames`, `renderLabel`) or your own on `useAlternateLinks()`.
- Paths: `buildLocalizedPath` / `switchLocalePath` with `homeSlug` and `prefix` — for your own link helpers.