44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import { sqliteAdapter } from '@payloadcms/db-sqlite'
|
|
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 { Tags } from './collections/Tags'
|
|
import { Posts } from './collections/Posts'
|
|
import { Pastors } from './collections/Pastors'
|
|
import { PastorLetters } from './collections/PastorLetters'
|
|
|
|
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, Posts, Media, Tags, Pastors, PastorLetters],
|
|
editor: lexicalEditor(),
|
|
secret: process.env.PAYLOAD_SECRET || '',
|
|
typescript: {
|
|
outputFile: path.resolve(dirname, 'payload-types.ts'),
|
|
},
|
|
db: sqliteAdapter({
|
|
client: {
|
|
url: process.env.DATABASE_URI || 'file:./ministerial.db',
|
|
},
|
|
}),
|
|
sharp,
|
|
localization: {
|
|
locales: ['en'],
|
|
fallback: true,
|
|
defaultLocale: 'en',
|
|
},
|
|
plugins: [],
|
|
})
|