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
+11 -3
View File
@@ -1,6 +1,7 @@
import { validateFaviconField } from '../../../modules/seo/index.js';
/**
* General site identity fields.
* Consumed by SEO/OG (siteName, defaultShareImage) and frontend (logo).
* Consumed by SEO/OG (siteName, defaultShareImage) and frontend (logo, favicon).
*/ export const generalFields = [
{
name: 'siteName',
@@ -63,7 +64,7 @@
name: 'logo',
type: 'upload',
admin: {
description: 'Primary site logo.'
description: 'Primary site logo. Also used for Organization structured data (buildOrganizationJsonLd).'
},
relationTo: 'media'
},
@@ -79,7 +80,14 @@
name: 'favicon',
type: 'upload',
admin: {
description: 'Square source icon (PNG or SVG) for the browser tab. Rendered by the frontend.'
description: 'Square icon, PNG or SVG, min. 48×48px (Google requires this to show it in search). Rendered via buildIconsMetadata.'
},
hooks: {
// Warns the editor at save time if the favicon is too small (<48×48) or
// not square — Google won't display such favicons in search results.
beforeValidate: [
validateFaviconField
]
},
relationTo: 'media'
}