File tree Expand file tree Collapse file tree 2 files changed +27
-25
lines changed
Expand file tree Collapse file tree 2 files changed +27
-25
lines changed Original file line number Diff line number Diff line change @@ -18,27 +18,33 @@ export const blog = defineCollection({
1818export 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
4450export const collections = {
Original file line number Diff line number Diff line change @@ -4,10 +4,6 @@ title: 'Bookmarked: Your Go-To Tool for Curating Tweets in Notion'
44htmlTitle : ' Bookmarked: Your Go-To Tool for\nCurating Tweets in Notion'
55description : ' A full-stack application that enables users to save tweets to Notion via Telegram bot.'
66heroImage : ' ../../assets/project_bookmarked_1.png'
7- contributors :
8- - name : ' Jesica'
9- username : ' jestsee'
10- url : ' https://twitter.com/jestseee'
117links :
128 - name : ' Website'
139 icon : ' Web'
You can’t perform that action at this time.
0 commit comments