Admin link previews: site name, description, preview image, noindex; technology support credit

- adminMeta (default on, with or without whiteLabel): robots noindex/nofollow,
  title suffix "— <site> | Panel", og:site_name and en/pl description from
  Site settings, preview image GET /api/ipal/admin-og (next/og, from the logo
  or name, no external service) and icon GET /api/ipal/admin-icon
- the site name sits in a process-wide store read through getters, so link
  previews stay current after a Site settings save and across config loads
- agency option (default Intecion.com) feeds the credit, description and image;
  credit reads "Technology support: Intecion.com" (pl: Wsparcie technologiczne)
- the project's own admin.meta keys always win; adminMeta: false / agency: false
- dev: whiteLabel on; docs: white-label.md, AGENT.md, ipal-reference/setup/upgrade

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 11:31:42 +01:00
co-authored by Claude Opus 5.5
parent 6998b44431
commit 3c828d963d
16 changed files with 647 additions and 38 deletions
+17
View File
@@ -14,6 +14,7 @@ export type TotpPluginFactory = (options: {
}) => Plugin
import type { GlobalOverrides } from './globals/overrides.js'
import type { AccessOption } from './modules/access/types.js'
import type { AdminMetaOptions, AgencyOption } from './modules/branding/adminMeta.js'
import type { ConsentLogOptions } from './modules/consent/consentLog.js'
import type { CookieScannerOptions } from './modules/consent/scanner/types.js'
import type { ContentOption } from './modules/content/types.js'
@@ -35,6 +36,15 @@ export type IpalOptions = {
*/
access?: AccessOption
/**
* Admin panel <head> for link previews and search engines (default on):
* noindex/nofollow, title suffix "— <site> | Panel", siteName and a short
* description from Site settings, a preview image drawn from the site's logo
* (GET /api/ipal/admin-og) and the site's favicon (GET /api/ipal/admin-icon).
* Keys the project sets in its own `admin.meta` always win. `false` = Payload's defaults.
*/
adminMeta?: AdminMetaOptions | false
/**
* Custom admin panel route, e.g. '/its' instead of the default '/admin'.
* The plugin sets config.routes.admin. IMPORTANT: this alone isn't enough —
@@ -47,6 +57,13 @@ export type IpalOptions = {
*/
adminRoute?: string
/**
* Who supports the technology, named in the admin credit, the panel's link
* description and its preview image. Default `{ name: 'Intecion.com', url: 'https://intecion.com' }`.
* `false` = no agency anywhere.
*/
agency?: AgencyOption | false
/** Internationalization — locales, default locale, fallback behavior */
/**
* Consent log (proof of consent, GDPR Art. 7(1)): adds the `consent-records`