phase 1-2 done
This commit is contained in:
12
sanity/schemas/tag.ts
Normal file
12
sanity/schemas/tag.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { defineField, defineType } from "sanity";
|
||||
|
||||
export const tag = defineType({
|
||||
name: "tag",
|
||||
title: "Tag",
|
||||
type: "document",
|
||||
fields: [
|
||||
defineField({ name: "title", title: "عنوان", type: "string", validation: (r) => r.required() }),
|
||||
defineField({ name: "slug", title: "Slug", type: "slug", options: { source: "title" }, validation: (r) => r.required() }),
|
||||
],
|
||||
preview: { select: { title: "title" } },
|
||||
});
|
||||
Reference in New Issue
Block a user