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

export default collection({
  label: 'Authors',
  slugField: 'name',
  path: 'content/taxonomy/authors/*',
  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,
    }),
  },
});
