Reference site: Example Studio on ipal-kit (reference/), index for agents, CI job

reference/ is one complete client site on the plugin (made-up company, pl/en,
MongoDB, every library block and template, token standard light/dark, forms,
consent, SEO/GEO, enforced CSP, 2FA, base + demo seeds, Coolify runbook,
smoke tests). It uses the plugin as file:.. (injected) and is not shipped.

- docs/agent/reference-site/INDEX.md (generated by scripts/reference-index.mjs,
  kept current by test/referenceIndex.test.ts)
- AGENT.md section and pointers in ipal-site, ipal-setup, ipal-reference,
  ipal-upgrade, ipal-block; release steps in PROGRAMISTA §8.1b
- CI: reference (fast) on every push, reference-full on main; doctor steps
  wired, commented until ipal-doctor ships

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 15:17:11 +01:00
co-authored by Claude Opus 5.5
parent 8bb5ebd394
commit 8adac41f92
129 changed files with 18440 additions and 1 deletions
+69
View File
@@ -0,0 +1,69 @@
import { faqItemsFromLayout } from '@intecion/ipal-kit/blocks'
import { buildLocalBusinessJsonLd, createContentHelpers } from '@intecion/ipal-kit'
import { getPayload } from 'payload'
import { contentConfig } from '@/content.config'
import { i18nConfig, type Locale } from '@/i18n.config'
import config from '@/payload.config'
/** The ONLY access to Payload, routes, links and navigation (AGENT.md §3, PROGRAMISTA §2.7). */
export const {
// data
getCachedPayload,
getSettings,
getConfiguredLocales,
getConstructionMode,
resolveRoute,
getEntries,
getNotFoundPage,
generatePageMetadata,
generateStaticParams,
getPageJsonLd,
resolvePageRedirect,
i18n,
// layout, forms, links
getSiteShell,
getFormTexts,
getLinkOptions,
getHomeSlug,
resolveLink,
resolveNav,
getSystemLinks,
// routes (re-exported in app/)
sitemap,
sitemapRoute,
getRobots,
manifest,
llmsRoute,
llmsFullRoute,
markdownRoute,
mcpGET,
mcpPOST,
healthRoute,
indexNowKeyRoute,
} = createContentHelpers({
baseUrl: process.env.NEXT_PUBLIC_SERVER_URL,
config,
content: contentConfig,
i18n: i18nConfig,
markdownAlternate: true, // GEO: <link rel="alternate" type="text/markdown"> on every page
mcp: { serverName: 'example-studio-site' },
pageJsonLd: { faq: (doc) => faqItemsFromLayout(doc) }, // FAQ blocks → FAQPage rich results
// LocalBusiness from the Company global (replaces the default WebSite + Organization from Site settings)
siteJsonLd: async ({ baseUrl, locale }) => {
const payload = await getPayload({ config })
const company = await payload.findGlobal({ slug: 'company', locale: locale as Locale })
return [
buildLocalBusinessJsonLd({
address: { city: company.address?.city ?? undefined, country: company.address?.country ?? 'PL', postalCode: company.address?.postalCode ?? undefined, street: company.address?.street ?? undefined },
name: company.name,
openingHours: company.hours ?? undefined,
sameAs: (company.socials ?? []).map((s) => s.url),
telephone: company.phone ?? undefined,
type: 'ProfessionalService',
url: baseUrl,
}),
]
},
summaryField: 'aiSummary',
})
+10
View File
@@ -0,0 +1,10 @@
import { cache } from 'react'
import type { Locale } from '@/i18n.config'
import { getCachedPayload } from './content'
/** Cached getters for the project's own globals — the layout passes them down as props (ipal-nav). */
export const getHeader = cache(async (locale: string) => (await getCachedPayload()).findGlobal({ slug: 'header', depth: 1, locale: locale as Locale }))
export const getFooter = cache(async (locale: string) => (await getCachedPayload()).findGlobal({ slug: 'footer', depth: 1, locale: locale as Locale }))
export const getCompany = cache(async (locale: string) => (await getCachedPayload()).findGlobal({ slug: 'company', locale: locale as Locale }))