@@ -17,17 +17,24 @@ const blog = defineCollection({
1717
1818const people = defineCollection ( {
1919 loader : glob ( { pattern : '**/*.{md,mdx}' , base : './src/content/people' } ) ,
20- schema : z . object ( {
21- name : z . string ( ) ,
22- title : z . string ( ) ,
23- avatar : z . string ( ) . url ( ) . or ( z . string ( ) . startsWith ( '/' ) ) . optional ( ) ,
24- email : z . string ( ) . email ( ) . optional ( ) ,
25- website : z . string ( ) . url ( ) . optional ( ) ,
26- github : z . string ( ) . url ( ) . optional ( ) ,
27- linkedin : z . string ( ) . url ( ) . optional ( ) ,
28- scholar : z . string ( ) . url ( ) . optional ( ) ,
29- isPastMember : z . boolean ( ) . optional ( ) ,
30- } ) ,
20+ schema : ( { image } ) =>
21+ z . object ( {
22+ name : z . string ( ) ,
23+ title : z . string ( ) ,
24+ avatar : z
25+ . union ( [
26+ z . string ( ) . url ( ) , // External URLs
27+ z . string ( ) . startsWith ( '/' ) , // Public folder paths
28+ image ( ) , // Local images (processed by Astro)
29+ ] )
30+ . optional ( ) ,
31+ email : z . string ( ) . email ( ) . optional ( ) ,
32+ website : z . string ( ) . url ( ) . optional ( ) ,
33+ github : z . string ( ) . url ( ) . optional ( ) ,
34+ linkedin : z . string ( ) . url ( ) . optional ( ) ,
35+ scholar : z . string ( ) . url ( ) . optional ( ) ,
36+ isPastMember : z . boolean ( ) . optional ( ) ,
37+ } ) ,
3138} )
3239
3340const projects = defineCollection ( {
0 commit comments