import { collection, fields } from '@keystatic/core'

export const AuthorsCollection = collection({
  label: 'Authors',
  slugField: 'name',
  path: 'src/content/taxonomy/authors/*',
  format: { data: 'json' },
  schema: {
    name: fields.slug({ name: { label: 'Name' } }),
    avatar: fields.image({
      label: 'Avatar',
      directory: 'public/images/authors',
      publicPath: '/images/authors',
    }),
    description: fields.text({ label: 'Description', multiline: true }),
  },
})
