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:
+6
-2
@@ -23,7 +23,7 @@
|
||||
3. **Next 16 = `proxy.ts`.** NIGDY `middleware.ts`.
|
||||
4. **Bez jawnego `<head>`, z ISR i `generateStaticParams`** — inaczej metadata
|
||||
ląduje w `<body>` i SEO pada.
|
||||
5. **Minimum kolekcji.** Users są wbudowane, dane firmy/nawigacja to globale,
|
||||
5. **Minimum kolekcji.** Users wstrzykuje ipalKit, dane firmy/nawigacja to globale,
|
||||
FAQ/hero to bloki.
|
||||
6. **Sekcja = kompozycja prymitywów.** `buildLinksField()` + `<CMSLink>`, upload +
|
||||
`<Media>`, `<Section>` + `<SectionHeader>`. Zero pól `ctaLabel`/`pdfUrl`.
|
||||
@@ -315,7 +315,11 @@ Domyślnie: `pages`, `media` + globale pluginu (`site-settings`,
|
||||
`site-integrations`, Notifications, Cookie Settings) + globale projektu
|
||||
(nawigacja, stopka, firma). Nic więcej, dopóki klient jawnie nie wymaga.
|
||||
|
||||
**NIGDY:** `users` (wbudowane w Payload), druga `media`, `daneFirmy`/`settings`/
|
||||
**`users`** wstrzykuje `ipalKit` (kolekcja auth z `roles` i 2FA) — nie twórz jej, chyba
|
||||
że potrzebujesz dodatkowych pól (wtedy własna `Users.ts` ze slugiem z `access.authCollection`;
|
||||
plugin doda do niej role i 2FA).
|
||||
|
||||
**NIGDY:** druga `media`, `daneFirmy`/`settings`/
|
||||
`navigation`/`footer` jako kolekcje (to globale), FAQ/hero/features jako kolekcje
|
||||
(to bloki), kolekcja dla jednej rzeczy (to strona albo global).
|
||||
|
||||
|
||||
@@ -142,8 +142,10 @@ fi
|
||||
|
||||
# --- Collections (§5.3) ---
|
||||
if [ -d src/collections ]; then
|
||||
report ERROR "forbidden collection" "§5.3 users are built in; settings/nav/footer are globals; FAQ/hero are blocks" \
|
||||
"$(ls src/collections | grep -iE '^(users|user|settings|navigation|nav|footer|header|faq|hero|company|danefirmy)\.ts$')"
|
||||
report ERROR "forbidden collection" "§5.3 settings/nav/footer are globals; FAQ/hero are blocks" \
|
||||
"$(ls src/collections | grep -iE '^(settings|navigation|nav|footer|header|faq|hero|company|danefirmy)\.ts$')"
|
||||
report WARNING "own users collection" "§5.3 ipalKit injects the auth collection — keep your own only to add fields (roles + 2FA still attach)" \
|
||||
"$(ls src/collections | grep -iE '^(users|user)\.ts$')"
|
||||
report WARNING "collections present — confirm each passed the §5.3 test" "minimum: Pages, Media" \
|
||||
"$(ls src/collections | grep -viE '^(pages|media|users|user|settings|navigation|nav|footer|header|faq|hero|company|danefirmy)\.ts$')"
|
||||
fi
|
||||
|
||||
@@ -1,21 +1,9 @@
|
||||
// src/app/(frontend)/[locale]/actions.ts — ONE server action for every builder form.
|
||||
// honeypot → client IP (IPAL_IP_HEADER) → submitForm (rate limit, Turnstile,
|
||||
// validation, GDPR consent, storage) → visitor message from Notifications.
|
||||
'use server'
|
||||
import { headers } from 'next/headers'
|
||||
import { submitForm } from '@intecion/ipal-kit/server'
|
||||
import { clientIp, isHoneypotTripped, HONEYPOT_FIELD, getNotificationTexts, resolveFormMessage } from '@intecion/ipal-kit'
|
||||
import { createSubmitAction } from '@intecion/ipal-kit/server'
|
||||
import { getCachedPayload } from '@/lib/content'
|
||||
|
||||
export async function sendForm(
|
||||
formId: string,
|
||||
locale: string,
|
||||
values: Record<string, unknown>,
|
||||
turnstileToken?: string,
|
||||
): Promise<{ success: boolean; message: string }> {
|
||||
const payload = await getCachedPayload()
|
||||
const texts = (await getNotificationTexts({ payload, locale })).form
|
||||
if (isHoneypotTripped(values)) return { success: true, message: texts.success } // bot: fake success, nothing stored
|
||||
const { [HONEYPOT_FIELD]: _hp, ...data } = values
|
||||
const ip = clientIp(await headers()) || undefined // headers(): fine in a server action — never in the page tree (breaks SSG)
|
||||
const result = await submitForm({ payload, formId, data, turnstileToken, ip })
|
||||
return { success: result.success, message: resolveFormMessage(result, texts) }
|
||||
}
|
||||
export const sendForm = createSubmitAction({ getCachedPayload, headers })
|
||||
|
||||
Reference in New Issue
Block a user