Gwk-Cultural-Park/schemas/section_story.ts
2024-09-07 08:40:25 +07:00

50 lines
1.1 KiB
TypeScript

import { format, parseISO } from 'date-fns'
import { TiPuzzleOutline } from 'react-icons/ti'
import { defineField, defineType } from 'sanity'
import content from './contentheritage'
export default {
name: 'sectionstory',
title: 'Story Page',
icon: TiPuzzleOutline,
type: 'document',
fields: [
{
name: 'title',
title: 'Title Page',
description: 'Judul halaman',
type: 'string',
validation: (rule) => rule.required(),
},
{
name: 'subtitle',
title: 'Sub Title Page',
description: 'Sub judul halaman',
type: 'string',
validation: (rule) => rule.required(),
},
{
name: 'coverImage',
title: 'Cover Image....',
description: 'Image untuk cover',
type: 'image',
options: {
hotspot: true,
},
},
{
name: 'contentpage',
title: 'Content Page',
description: 'Pilih content untuk halaman',
type: 'array',
of: [
{
type: 'reference',
to: { type: content.name },
},
],
},
],
}