feat: complete POI Clean House website with Karcher theme, blog, interactive animations and full CMS configuration
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { buildConfig } from 'payload'
|
||||
import { sqliteAdapter } from '@payloadcms/db-sqlite'
|
||||
import { lexicalEditor } from '@payloadcms/richtext-lexical'
|
||||
import { ipalKit, mailAdapter } from '@intecion/ipal-kit'
|
||||
import sharp from 'sharp'
|
||||
|
||||
import { i18nConfig } from './i18n.config'
|
||||
import { Users } from './collections/Users'
|
||||
import { Media } from './collections/Media'
|
||||
import { Pages } from './collections/Pages'
|
||||
import { Company } from './globals/Company'
|
||||
import { Navigation } from './globals/Navigation'
|
||||
|
||||
import { seed } from './seed'
|
||||
|
||||
const filename = fileURLToPath(import.meta.url)
|
||||
const dirname = path.dirname(filename)
|
||||
|
||||
export default buildConfig({
|
||||
admin: {
|
||||
user: Users.slug,
|
||||
importMap: {
|
||||
baseDir: path.resolve(dirname),
|
||||
},
|
||||
},
|
||||
collections: [Users, Media, Pages],
|
||||
globals: [Company, Navigation],
|
||||
editor: lexicalEditor(),
|
||||
sharp,
|
||||
secret: process.env.PAYLOAD_SECRET || 'fallback-secret-for-development-mode-12345',
|
||||
typescript: {
|
||||
outputFile: path.resolve(dirname, 'payload-types.ts'),
|
||||
},
|
||||
db: sqliteAdapter({
|
||||
client: {
|
||||
url: process.env.DATABASE_URI || 'file:./dev.db',
|
||||
},
|
||||
}),
|
||||
email: mailAdapter(),
|
||||
onInit: async (payload) => {
|
||||
try {
|
||||
await seed(payload)
|
||||
} catch (err) {
|
||||
payload.logger.error(`Błąd podczas seedowania: ${err}`)
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
ipalKit({
|
||||
i18n: i18nConfig,
|
||||
access: { authCollection: 'users' },
|
||||
pages: { slug: 'pages' },
|
||||
seo: { collections: ['pages'] },
|
||||
forms: { redirectRelationships: ['pages'] },
|
||||
}),
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user