-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathproject.ts
75 lines (73 loc) · 1.65 KB
/
project.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import { BiPackage } from "react-icons/bi";
import { defineField } from "sanity";
const project = {
name: "project",
title: "Projects",
description: "Project Schema",
type: "document",
icon: BiPackage,
fields: [
{
name: "name",
title: "Name",
type: "string",
description: "Enter the name of the project",
},
defineField({
name: "tagline",
title: "Tagline",
type: "string",
validation: (rule) => rule.max(60).required(),
}),
{
name: "slug",
title: "Slug",
type: "slug",
description:
"Add a custom slug for the URL or generate one from the name",
options: { source: "name" },
},
{
name: "logo",
title: "Project Logo",
type: "image",
},
{
name: "projectUrl",
title: "Project URL",
type: "url",
description: "Leaving this URL blank will add a coming soon to the link.",
},
{
name: "repository",
title: "Repository URL",
type: "url",
description:
'Leaving this URL blank will add a "No Repository" message to the link.',
},
{
name: "coverImage",
title: "Cover Image",
type: "image",
description: "Upload a cover image for this project",
options: {
hotspot: true,
metadata: ["lqip"],
},
fields: [
{
name: "alt",
title: "Alt",
type: "string",
},
],
},
defineField({
name: "description",
title: "Description",
type: "blockContent",
description: "Write a full description about this project",
}),
],
};
export default project;