starting to understand payload
This commit is contained in:
27
src/collections/Page.ts
Normal file
27
src/collections/Page.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { lexicalEditor } from '@payloadcms/richtext-lexical'
|
||||
import type { CollectionConfig } from 'payload'
|
||||
|
||||
export const Page: CollectionConfig = {
|
||||
slug: 'pages',
|
||||
defaultPopulate: {
|
||||
title: true,
|
||||
slug: true,
|
||||
},
|
||||
access: {
|
||||
read: () => true,
|
||||
},
|
||||
admin: {
|
||||
defaultColumns: ['title', 'slug', 'updatedAt',],
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'title',
|
||||
type: 'text',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'richText',
|
||||
type: 'richText'
|
||||
}
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user