Files
ipal-kit/reference/src/lib/content.ts
T
Radosław SmolińskiandClaude Fable 5.2 b91984fbcd IAPL rename: docs, agent guide, skills, reference site and starter on the new names; changelog draft
- docs, AGENT.md, the 16 skills, PROGRAMISTA and README use the preferred names (scripted, same list of forms);
  past CHANGELOG entries and the proposals in docs/dev are not rewritten
- AGENT.md: 'Names: IAPL and ipal-kit' — old name, new name, state in 1.x; what is not renamed; storageNames
- iapl-upgrade '→ 1.17.0', PROGRAMISTA §6 item 72, CHANGELOG 1.17.0 (draft): nothing required
- env.md, doctor.md (legacy-names, storage-names), stats.md, security.md, project-starter.md, iapl-reference, iapl-setup
- skill scripts read ipal-audit-skip and IPAL_IP_HEADER too; audit rule ids stay what they were
- reference site: iapl(), iapl-doctor.json, iapl-* skills, storageNames: 'iapl'; INDEX.md regenerated

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 17:36:09 +01:00

85 lines
2.8 KiB
TypeScript

import { faqItemsFromLayout } from '@intecion/ipal-kit/blocks'
// @starter:if localBusiness
import { buildLocalBusinessJsonLd, createContentHelpers } from '@intecion/ipal-kit'
import { getPayload } from 'payload'
import { contentConfig } from '@/content.config'
import { i18nConfig, type Locale } from '@/i18n.config'
// @starter:else
//: import { createContentHelpers } from '@intecion/ipal-kit'
//:
//: import { contentConfig } from '@/content.config'
//: import { i18nConfig } from '@/i18n.config'
// @starter:endif
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
// @starter:if aiBotsBlockTraining
//: robots: { aiBots: 'block-training' }, // client decision — AGENTS.md → Project decisions (iapl-audit-skip: aibots)
// @starter:endif
// @starter:if aiBotsDisallow
//: robots: { aiBots: 'disallow' }, // client decision — AGENTS.md → Project decisions (iapl-audit-skip: aibots)
// @starter:endif
// @starter:if localBusiness
// 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,
}),
]
},
// @starter:endif
summaryField: 'aiSummary',
})