import { collection, fields } from '@keystatic/core';
import { createSEOField } from '@fields/seo.ts';
import { createContentField } from '@fields/content.ts';

export const pages = collection({
  label: 'Pages',
  slugField: 'title',
  path: 'src/content/pages/*',
  format: { contentField: 'body' },
  entryLayout: 'content',
  schema: {
    title: fields.slug({ name: { label: 'Title' } }),
    seo: createSEOField(),
    body: createContentField(),
  },
});
