SEO/GEO tools and project requests: site index, IndexNow, page JSON-LD, fixes
GEO / SEO
- collectSiteIndex: one list of public docs per locale (pages + archive
entries) on sitemap rules; llms.txt/llms-full and MCP list_pages now include
blog/content entries and every language. Fixes hard-coded "## Strony" heading
and homepage not collapsing to the locale root in llms.txt.
- Markdown frontmatter: canonical url + updated date.
- Metadata: X/Twitter card, OG image width/height/alt, og:type article with
published/modified times for entries.
- Fix: Site Settings "defaultShareImage" was never used — now the OG fallback.
- getPageJsonLd (createContentHelpers): WebPage/CollectionPage/BlogPosting,
BreadcrumbList from the real route, FAQPage via a project mapper.
- IndexNow (opt-in ipalKit({ indexNow: true })): submit published URLs in all
languages, key generated in Site Integrations or INDEXNOW_KEY, key route.
- sameAs profiles in Site Settings + sameAsUrls(); sitemap <image:image>.
From project reports
- Fix: package exports were missing ./env and ./fluid.css although the docs
import them (TS2307); regression test checks every documented subpath.
- Fix: plugins run before Payload adds its default users collection, so roles
and 2FA had nothing to attach to — ipalKit injects an auth collection when
the project has none (project's own one wins). Audit no longer errors on it.
- createMarkdownRoute, createSubmitAction (/server, headers injected).
- formatOpeningHours (PL/EN/DE text → schema.org), used by
buildLocalBusinessJsonLd, which also takes a schema.org `type`.
- buildNavigationJsonLd straight from the header global.
- buildCsp googleMaps: full Maps JS API domain set; values de-duplicated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -3,7 +3,7 @@ export type BuildCspArgs = {
|
||||
analytics?: boolean
|
||||
/** Extra sources per directive, merged with the built-ins. */
|
||||
extra?: Partial<Record<CspDirective, string[]>>
|
||||
/** Google Maps embeds — adds maps.google.com / *.gstatic.com. */
|
||||
/** Google Maps — embeds (iframe) and the Maps JavaScript API, full domain set. Google Fonts are allowed by default. */
|
||||
googleMaps?: boolean
|
||||
/** 'enforce' → Content-Security-Policy; 'report-only' → …-Report-Only header. */
|
||||
mode?: 'enforce' | 'report-only'
|
||||
@@ -96,9 +96,14 @@ export function buildCsp(args: BuildCspArgs = {}): { key: string; value: string
|
||||
}
|
||||
|
||||
if (googleMaps) {
|
||||
src['frame-src'].push('https://www.google.com', 'https://maps.google.com')
|
||||
src['script-src'].push('https://maps.googleapis.com')
|
||||
src['img-src'].push('https://maps.gstatic.com', 'https://*.googleapis.com')
|
||||
// Embeds (iframe) and the Maps JavaScript API — the domain set from Google's
|
||||
// CSP guide for Maps JS (tiles, markers, Street View images, fonts, workers).
|
||||
const g = ['https://*.googleapis.com', 'https://*.gstatic.com', 'https://*.google.com', 'https://*.ggpht.com', 'https://*.googleusercontent.com']
|
||||
src['frame-src'].push('https://www.google.com', 'https://maps.google.com', 'https://*.google.com')
|
||||
src['script-src'].push(...g)
|
||||
src['img-src'].push(...g)
|
||||
src['connect-src'].push('https://*.googleapis.com', 'https://*.google.com', 'https://*.gstatic.com', 'data:', 'blob:')
|
||||
src['worker-src'].push('blob:')
|
||||
}
|
||||
|
||||
// Merge caller extras.
|
||||
@@ -108,7 +113,7 @@ export function buildCsp(args: BuildCspArgs = {}): { key: string; value: string
|
||||
|
||||
const value = (Object.entries(src) as Array<[CspDirective, string[]]>)
|
||||
.filter(([, values]) => values.length > 0)
|
||||
.map(([dir, values]) => `${dir} ${values.join(' ')}`)
|
||||
.map(([dir, values]) => `${dir} ${[...new Set(values)].join(' ')}`)
|
||||
.join('; ')
|
||||
|
||||
const key = mode === 'report-only' ? 'Content-Security-Policy-Report-Only' : 'Content-Security-Policy'
|
||||
|
||||
Reference in New Issue
Block a user