import { collection } from '@keystatic/core';
import { createBaseArticleFields } from '@fields/base-article.ts';
import { createContentField } from '@fields/content.ts';

export const articles = collection({
  label: 'Articles',
  slugField: 'title',
  path: 'src/content/articles/*/',
  format: { contentField: 'body' },
  entryLayout: 'content',
  schema: {
    ...createBaseArticleFields(),
    body: createContentField(),
  },
});
