SEO: favicon metadata, Organization JSON-LD, favicon validation; R2 media (preconnect, generateFileURL per-collection), filename normalization

This commit is contained in:
2026-08-28 00:08:35 +02:00
parent f1f808d079
commit b9430e7ab6
25 changed files with 490 additions and 11 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { FieldHook } from 'payload';
/**
* Field validation for the favicon upload: Google rejects favicons under 48×48,
* so warn the editor at save time if the uploaded icon is too small or not
* square. This ENFORCES the requirement instead of silently shipping a favicon
* Google won't display.
*
* Attach to the favicon field's validate (or as a beforeValidate hook on the
* Media relationship). Non-blocking by default — returns a warning string that
* Payload surfaces; make it throw if you want a hard block.
*
* Note: dimensions come from the related Media doc (Payload stores width/height
* for image uploads), so this checks the resolved upload, not the raw file.
*/
export declare const validateFaviconField: FieldHook;