36 lines
517 B
TypeScript
36 lines
517 B
TypeScript
import { type CollectionConfig } from 'payload';
|
|
|
|
export const Media: CollectionConfig = {
|
|
slug: 'media',
|
|
|
|
upload: {
|
|
staticDir: 'media'
|
|
},
|
|
|
|
labels: {
|
|
singular: 'Medium',
|
|
plural: 'Medien'
|
|
},
|
|
|
|
admin: {
|
|
useAsTitle: 'title',
|
|
group: 'Inhalte',
|
|
description: 'Artikel verwalten',
|
|
defaultColumns: [ 'id', 'title', 'alt' ],
|
|
hideAPIURL: true
|
|
},
|
|
|
|
fields: [
|
|
{
|
|
name: 'title',
|
|
label: 'Titel',
|
|
type: 'text',
|
|
required: true
|
|
},
|
|
{
|
|
name: 'alt',
|
|
label: 'Alt-Tag',
|
|
type: 'text'
|
|
}
|
|
]
|
|
}; |