Add block editing
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tobias
2024-06-23 22:23:06 +02:00
parent f9ee909e01
commit 60f7a4e4f2
32 changed files with 1061 additions and 256 deletions

View File

@ -27,6 +27,7 @@ import Media from '@payload/collections/Media'
import Authors from '@payload/collections/Authors'
import Posts from '@payload/collections/Posts'
import Users from '@payload/collections/Users'
import Pages from '@payload/collections/Pages'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
@ -40,28 +41,7 @@ export default buildConfig({
},
},
editor: lexicalEditor(),
collections: [
Users,
Posts,
Authors,
Media,
{
slug: 'pages',
admin: {
useAsTitle: 'title',
},
fields: [
{
name: 'title',
type: 'text',
},
{
name: 'content',
type: 'richText',
},
],
},
],
collections: [Users, Posts, Authors, Media, Pages],
secret: process.env.PAYLOAD_SECRET || '',
typescript: {
outputFile: path.resolve(dirname, 'types/payload-types.ts'),