43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
import sharp from 'sharp'
|
|
import { FixedToolbarFeature, lexicalEditor } from '@payloadcms/richtext-lexical'
|
|
import { postgresAdapter } from '@payloadcms/db-postgres'
|
|
import { buildConfig } from 'payload'
|
|
|
|
import { Home } from '@/globals/Home'
|
|
|
|
import { News } from './src/collections/News'
|
|
import { Projects } from '@/collections/Projects'
|
|
import { Data, Documents, Media } from '@/collections/Files'
|
|
|
|
export default buildConfig({
|
|
// If you'd like to use Rich Text, pass your editor here
|
|
editor: lexicalEditor({
|
|
features: ({ defaultFeatures }) => [
|
|
...defaultFeatures,
|
|
FixedToolbarFeature(),
|
|
]
|
|
}),
|
|
|
|
serverURL: process.env.SERVER_URL || 'http://localhost:3000',
|
|
|
|
globals: [Home],
|
|
|
|
// Define and configure your collections in this array
|
|
collections: [Projects, News, Media, Documents, Data],
|
|
|
|
// Your Payload secret - should be a complex and secure string, unguessable
|
|
secret: process.env.PAYLOAD_SECRET || '',
|
|
// Whichever Database Adapter you're using should go here
|
|
// Mongoose is shown as an example, but you can also use Postgres
|
|
db: postgresAdapter({
|
|
pool: {
|
|
connectionString: process.env.DATABASE_URI,
|
|
}
|
|
}),
|
|
// If you want to resize images, crop, set focal point, etc.
|
|
// make sure to install it and pass it to the config.
|
|
// This is optional - if you don't need to do these things,
|
|
// you don't need it!
|
|
sharp,
|
|
})
|