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:
co-authored by
Claude Opus 5.5
parent
8bb5ebd394
commit
8adac41f92
@@ -0,0 +1,58 @@
|
||||
import { payloadTotp } from '@clocklimited/payload-2fa'
|
||||
import { buildR2Storage, ipalKit, mailAdapter } from '@intecion/ipal-kit'
|
||||
import { lexicalEditor } from '@payloadcms/richtext-lexical'
|
||||
import { s3Storage } from '@payloadcms/storage-s3'
|
||||
import { revalidatePath } from 'next/cache'
|
||||
import path from 'path'
|
||||
import { buildConfig } from 'payload'
|
||||
import sharp from 'sharp'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
import { CaseStudies } from './collections/CaseStudies'
|
||||
import { Media } from './collections/Media'
|
||||
import { Pages } from './collections/Pages'
|
||||
import { Posts } from './collections/Posts'
|
||||
import { contentConfig } from './content.config'
|
||||
import { db } from './db'
|
||||
import { Company } from './globals/Company'
|
||||
import { Footer } from './globals/Footer'
|
||||
import { Header } from './globals/Header'
|
||||
import { i18nConfig } from './i18n.config'
|
||||
|
||||
const dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
export default buildConfig({
|
||||
admin: {
|
||||
user: 'users',
|
||||
importMap: { baseDir: path.resolve(dirname) },
|
||||
},
|
||||
// absolute URLs in form e-mails (logo, links)
|
||||
serverURL: process.env.NEXT_PUBLIC_SERVER_URL,
|
||||
collections: [Pages, Posts, CaseStudies, Media], // ipalKit injects `users` (roles + 2FA)
|
||||
globals: [Header, Footer, Company],
|
||||
db,
|
||||
editor: lexicalEditor(),
|
||||
email: mailAdapter(), // transport from Site integrations (SMTP / Graph); without it form e-mails are not sent
|
||||
secret: process.env.PAYLOAD_SECRET ?? '',
|
||||
sharp,
|
||||
typescript: { outputFile: path.resolve(dirname, 'payload-types.ts') },
|
||||
plugins: [
|
||||
ipalKit({
|
||||
i18n: i18nConfig,
|
||||
access: { authCollection: 'users' },
|
||||
pages: { slug: 'pages' },
|
||||
content: contentConfig,
|
||||
seo: { collections: ['pages', 'posts', 'caseStudies'] },
|
||||
forms: { redirectRelationships: ['pages'], emailLayout: true },
|
||||
twoFactor: { issuer: 'Example Studio', plugin: payloadTotp },
|
||||
whiteLabel: true,
|
||||
indexNow: true,
|
||||
consentLog: true,
|
||||
// Privacy → Cookie review: scan + approval; crawl needs IPAL_COOKIE_SCAN_URL / IPAL_COOKIE_SCAN_TOKEN
|
||||
cookieScanner: { crawl: true },
|
||||
lightbox: true,
|
||||
revalidatePath,
|
||||
}),
|
||||
buildR2Storage(['media'], { s3Storage }), // R2 with the full R2_* set, local disk without it
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user