Skip to content

Commit

Permalink
Add book schema (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattobee authored Jan 2, 2025
1 parent 6413213 commit 690af09
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions schemas/book.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {defineType, defineField} from 'sanity'

export const book = defineType({
title: "Books",
name: "book",
type: "document",
fields: [
defineField({
title: "Title",
name: "title",
type: "string"
}),
defineField({
title: "Link",
name: "link",
type: "url"
}),
defineField({
title: "Date",
name: "date",
type: "date"
}),
]
})

export default book;
3 changes: 2 additions & 1 deletion schemas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import course from './course'
import provider from './provider'
import person from './person'
import collection from './collection'
import book from './book'

export const schemaTypes = [event, course, provider, person, collection]
export const schemaTypes = [event, course, provider, person, collection, book]

0 comments on commit 690af09

Please sign in to comment.