Skip to content

Commit 19f1ac6

Browse files
committed
chore: update projects config
1 parent 0d91ac6 commit 19f1ac6

File tree

2 files changed

+27
-25
lines changed

2 files changed

+27
-25
lines changed

src/content/config.ts

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,33 @@ export const blog = defineCollection({
1818
export const projects = defineCollection({
1919
type: 'content',
2020
schema: ({ image }) =>
21-
z.object({
22-
year: z.number(),
23-
title: z.string(),
24-
htmlTitle: z.string(),
25-
description: z.string(),
26-
heroImage: image(),
27-
readingTime: z.number().optional(),
28-
wordsCount: z.number().optional(),
29-
contributors: z.array(
30-
z.object({ name: z.string(), username: z.string(), url: z.string() })
31-
),
32-
links: z.array(
33-
z.object({
34-
icon: iconSchema,
35-
name: z.string(),
36-
url: z.string()
37-
})
38-
),
39-
updatedDate: z.coerce.date().optional(),
40-
latestCommitUrl: z.string().optional()
41-
})
21+
z
22+
.object({
23+
year: z.number(),
24+
title: z.string(),
25+
htmlTitle: z.string().optional(),
26+
description: z.string(),
27+
heroImage: image(),
28+
heroImageAlign: z.enum(['top', 'center']).default('top'),
29+
links: z
30+
.array(
31+
z.object({
32+
icon: iconSchema,
33+
name: z.string(),
34+
url: z.string()
35+
})
36+
)
37+
.optional()
38+
.default([]),
39+
readingTime: z.number().optional(),
40+
wordsCount: z.number().optional(),
41+
updatedDate: z.coerce.date().optional(),
42+
latestCommitUrl: z.string().optional()
43+
})
44+
.transform((data) => ({
45+
...data,
46+
htmlTitle: data.htmlTitle || data.title
47+
}))
4248
})
4349

4450
export const collections = {

src/content/projects/bookmarked.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ title: 'Bookmarked: Your Go-To Tool for Curating Tweets in Notion'
44
htmlTitle: 'Bookmarked: Your Go-To Tool for\nCurating Tweets in Notion'
55
description: 'A full-stack application that enables users to save tweets to Notion via Telegram bot.'
66
heroImage: '../../assets/project_bookmarked_1.png'
7-
contributors:
8-
- name: 'Jesica'
9-
username: 'jestsee'
10-
url: 'https://twitter.com/jestseee'
117
links:
128
- name: 'Website'
139
icon: 'Web'

0 commit comments

Comments
 (0)