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
+6
-6
@@ -20,11 +20,11 @@ ipalKit({
|
||||
| `slug` | — (required) | slug of the client's Pages collection |
|
||||
| `roles` | all (`ALL_SYSTEM_PAGE_ROLES`) | which roles to show as fields |
|
||||
|
||||
Adds a **System Pages** tab in SiteSettings with relationship fields (field name = role:
|
||||
Adds a **System pages** tab in SiteSettings with relationship fields (field name = role:
|
||||
`homepage`, `notFound`, `privacyPolicy`, `cookiePolicy`, `termsOfService`) to your
|
||||
Pages collection. The editor picks which document plays which role. The plugin does not
|
||||
know your collection — you give the slug in the option. The `pages` option also turns on the
|
||||
**Under construction** tab ([construction.md](./construction.md)) and is required by `content`.
|
||||
**Maintenance** tab ([construction.md](./construction.md)) and is required by `content`.
|
||||
|
||||
## Front end — resolving a role's path
|
||||
|
||||
@@ -66,7 +66,7 @@ import { ALL_SYSTEM_PAGE_ROLES } from '@intecion/ipal-kit'
|
||||
|
||||
## 404 page — chosen in the admin panel (since 1.7.12)
|
||||
|
||||
Site Settings → System Pages → **404 (Not Found)**. The editor picks:
|
||||
Site settings → System pages → **404 (Not Found)**. The editor picks:
|
||||
|
||||
- a dedicated "Not found" page (e.g. slug `strona-nie-znaleziona`), **or**
|
||||
- the home page (some clients prefer that), **or**
|
||||
@@ -126,7 +126,7 @@ The `redirect` option (from `next/navigation`) turns on under-construction mode
|
||||
|
||||
**Missing page → home page** (1.11.1): `onMissing: 'redirectHome'` (needs `redirect`) — a URL with no page
|
||||
and no old slug (e.g. a retired `/pl/uslugi`) redirects (307) to the home page in the same language
|
||||
(System Pages → Homepage). No home page assigned, or the home page itself missing → a plain 404.
|
||||
(System pages → Homepage). No home page assigned, or the home page itself missing → a plain 404.
|
||||
Default `'notFound'`; your own decision: `onMissing: ({ locale, segments }) => redirect(…)`.
|
||||
|
||||
```tsx
|
||||
@@ -151,7 +151,7 @@ import { getConfiguredLocales, getNotFoundPage } from '@/lib/content'
|
||||
|
||||
/**
|
||||
* 404 view. The editor picks which page plays the 404 role in
|
||||
* Site Settings → System Pages → "404 (Not Found)" — a dedicated page or the
|
||||
* Site settings → System pages → "404 (Not Found)" — a dedicated page or the
|
||||
* homepage — or leaves it empty → the fallback below.
|
||||
*
|
||||
* not-found.tsx receives no params, and reading headers() here would turn the
|
||||
@@ -297,7 +297,7 @@ else skip it — otherwise you lose SSG and SEO.
|
||||
|
||||
## Turn off, override, extend
|
||||
|
||||
- Turn off: omit the `pages` option — the System Pages and Under construction tabs disappear (and `content` stops working).
|
||||
- Turn off: omit the `pages` option — the System pages and Maintenance tabs disappear (and `content` stops working).
|
||||
- `roles` limits the set of role fields; field labels and descriptions are currently fixed (in English).
|
||||
- You cannot add your own roles with the `pages` option — add extra SiteSettings fields with `siteSettingsFields` (the "Custom" tab, payload-helpers.md), but then call the helpers (`getSystemPagePath`, `getSystemLinks`) by hand: `getSystemPagePath({ page: settings.myRole, … })`, `getSystemLinks(locale, ['myRole'])`.
|
||||
- 404: `createNotFoundPage` (`load` / `blocks` / `fallback` / `blockProps`) or a fully custom `not-found.tsx` (above).
|
||||
|
||||
Reference in New Issue
Block a user