@@ -62,17 +62,16 @@ export default function BlogPostItemHeaderWrapper(props: Props): JSX.Element {
6262 return < BlogPostItemHeaderOriginal { ...props } /> ;
6363 }
6464
65- const primaryAuthor = metadata . authors ?. [ 0 ] ;
66- const profile = primaryAuthor ?. key ? getAuthorProfile ( primaryAuthor . key ) : undefined ;
67-
68- const authorAvatar = primaryAuthor ?. imageURL || profile ?. imageUrl ;
69- const authorName = primaryAuthor ?. name || profile ?. name ;
70- const githubHandle = primaryAuthor
71- ? getGitHubHandle ( { key : primaryAuthor . key , url : primaryAuthor . url } )
72- : undefined ;
73- const githubUrl = primaryAuthor
74- ? getGitHubUrl ( { key : primaryAuthor . key , url : primaryAuthor . url , name : primaryAuthor . name } )
75- : undefined ;
65+ // Build display data for ALL authors (not just the first one)
66+ const authors = ( metadata . authors ?? [ ] ) . map ( ( author ) => {
67+ const profile = author . key ? getAuthorProfile ( author . key ) : undefined ;
68+ return {
69+ avatar : author . imageURL || profile ?. imageUrl ,
70+ name : author . name || profile ?. name ,
71+ handle : getGitHubHandle ( { key : author . key , url : author . url } ) ,
72+ url : getGitHubUrl ( { key : author . key , url : author . url , name : author . name } ) ,
73+ } ;
74+ } ) ;
7675
7776 const roundedReadTime = Math . max ( 1 , Math . ceil ( metadata . readingTime || 0 ) ) ;
7877 const readTimeText = `${ roundedReadTime } min read` ;
@@ -94,35 +93,46 @@ export default function BlogPostItemHeaderWrapper(props: Props): JSX.Element {
9493 { /* Render only the title — Info and Authors are replaced by our compact bar */ }
9594 < BlogPostItemHeaderTitle />
9695 < div className = { styles . metaSection } >
97- { /* Compact meta row: avatar · @handle · date · reading time */ }
96+ { /* Compact meta row: avatars · @handles · date · reading time */ }
9897 < div className = { styles . metaRow } >
99- { ( authorAvatar || authorName ) && (
100- < div className = { styles . authorPart } >
101- { authorAvatar ? (
102- < img
103- className = { styles . avatar }
104- src = { authorAvatar }
105- alt = { authorName ? `${ authorName } avatar` : "Author avatar" }
106- loading = "lazy"
107- />
108- ) : (
109- < div className = { styles . avatarFallback } aria-hidden = "true" >
110- { authorName ?. charAt ( 0 ) . toUpperCase ( ) }
111- </ div >
112- ) }
113- { githubHandle &&
114- ( githubUrl ? (
115- < Link
116- to = { githubUrl }
117- className = { styles . handle }
118- target = "_blank"
119- rel = "noopener noreferrer"
120- >
121- { githubHandle }
122- </ Link >
123- ) : (
124- < span className = { styles . handle } > { githubHandle } </ span >
125- ) ) }
98+ { authors . length > 0 && (
99+ < div className = { styles . authorsPart } >
100+ { authors . map ( ( author , idx ) => (
101+ < React . Fragment key = { author . handle ?? `${ author . name ?? "" } -${ idx } ` } >
102+ { idx > 0 && (
103+ < span className = { styles . authorSep } aria-hidden = "true" >
104+ &
105+ </ span >
106+ ) }
107+ < div className = { styles . authorPart } >
108+ { author . avatar ? (
109+ < img
110+ className = { styles . avatar }
111+ src = { author . avatar }
112+ alt = { author . name ? `${ author . name } avatar` : "Author avatar" }
113+ loading = "lazy"
114+ />
115+ ) : (
116+ < div className = { styles . avatarFallback } aria-hidden = "true" >
117+ { author . name ?. charAt ( 0 ) . toUpperCase ( ) }
118+ </ div >
119+ ) }
120+ { author . handle &&
121+ ( author . url ? (
122+ < Link
123+ to = { author . url }
124+ className = { styles . handle }
125+ target = "_blank"
126+ rel = "noopener noreferrer"
127+ >
128+ { author . handle }
129+ </ Link >
130+ ) : (
131+ < span className = { styles . handle } > { author . handle } </ span >
132+ ) ) }
133+ </ div >
134+ </ React . Fragment >
135+ ) ) }
126136 </ div >
127137 ) }
128138
0 commit comments