Back to projects
Aug 07, 2023
1 min read

Recipe App

Experimenting with Headless CMS.

/studio

Content is managed within the app through Sanity Studio

studio-img

Blog Schema

The schema used to display the blog page shown in the studio

{
    name: 'blog',
    title: 'Blogs',
    type: 'document',
    fields: [
        {
            name: 'title',
            title: 'Blog Title',
            type: 'string',
        },
        {
            name: 'slug',
            title: 'Slug',
            type: 'slug',
            options: {
                source: 'title',
                maxLength: 96,
            },
        },
        {
            name:"author",
            title:"Author",
            type:"reference",
            to:[{type:"chef"}],
        },
        {
            name: "image",
            title: "Blog Image",
            type: "image",
            options: {
                hotspot: true,
            }
        },
        {
            name: 'content',
            title: 'Blog Content',
            type: 'array',
            of: [{ type: 'block' }],
        },
    ],
}