53 lines
1.4 KiB
TypeScript
53 lines
1.4 KiB
TypeScript
// storage-adapter-import-placeholder
|
|
import { mongooseAdapter } from '@payloadcms/db-mongodb'
|
|
import { lexicalEditor } from '@payloadcms/richtext-lexical'
|
|
import path from 'path'
|
|
import { buildConfig } from 'payload'
|
|
import { fileURLToPath } from 'url'
|
|
import sharp from 'sharp'
|
|
|
|
import { Users } from './collections/Users'
|
|
import { Media } from './collections/Media'
|
|
import { Worship } from '@/collections/Worship'
|
|
import { Churches } from '@/collections/Churches'
|
|
import { de } from '@payloadcms/translations/languages/de'
|
|
import { Testimony } from '@/collections/Testimony'
|
|
import { Parish } from '@/collections/Parish'
|
|
import { Employees } from '@/collections/Employees'
|
|
import { Groups } from '@/collections/Groups'
|
|
import { Events } from '@/collections/Events'
|
|
|
|
const filename = fileURLToPath(import.meta.url)
|
|
const dirname = path.dirname(filename)
|
|
|
|
export default buildConfig({
|
|
admin: {
|
|
user: Users.slug,
|
|
},
|
|
collections: [
|
|
Parish,
|
|
Churches,
|
|
Worship,
|
|
Events,
|
|
Groups,
|
|
Employees,
|
|
Testimony,
|
|
Users,
|
|
Media,
|
|
],
|
|
editor: lexicalEditor(),
|
|
secret: process.env.PAYLOAD_SECRET || '',
|
|
typescript: {
|
|
outputFile: path.resolve(dirname, 'payload-types.ts'),
|
|
},
|
|
i18n: {
|
|
supportedLanguages: { de },
|
|
},
|
|
db: mongooseAdapter({
|
|
url: process.env.DATABASE_URI || '',
|
|
}),
|
|
sharp,
|
|
plugins: [
|
|
// storage-adapter-placeholder
|
|
],
|
|
})
|