41 lines
877 B
TypeScript
41 lines
877 B
TypeScript
import { format, parseISO } from 'date-fns'
|
|
import { TiPuzzleOutline } from 'react-icons/ti'
|
|
import { defineField, defineType } from 'sanity'
|
|
|
|
import content from './linkGenerate'
|
|
|
|
export default {
|
|
name: 'customePage',
|
|
title: 'Custom 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: 'linkpage',
|
|
title: 'Pages',
|
|
description: 'Buat Halaman baru',
|
|
type: 'array',
|
|
of: [
|
|
{
|
|
type: 'reference',
|
|
to: { type: content.name },
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|