26 lines
486 B
TypeScript
26 lines
486 B
TypeScript
import { fields } from '@keystatic/core'
|
|
|
|
import { assets } from '@/lib/content/assets'
|
|
|
|
export const cover = (collection: string) =>
|
|
fields.object(
|
|
{
|
|
image: fields.image({
|
|
label: 'Image',
|
|
...assets(collection),
|
|
}),
|
|
alt: fields.text({
|
|
label: 'Alt text',
|
|
}),
|
|
caption: fields.text({
|
|
label: 'Caption',
|
|
}),
|
|
credit: fields.text({
|
|
label: 'Credit',
|
|
}),
|
|
},
|
|
{
|
|
label: 'Cover',
|
|
},
|
|
)
|