@@ -52,14 +52,14 @@ export function generateReportMarkdown(
5252 const monthYear = `${ monthNames [ month ] } ${ year } ` ;
5353 const dateStr = format ( endDate , "yyyy-MM-dd" ) ;
5454
55- // Generate frontmatter with MDX import for new contributors
55+ // Generate frontmatter with MDX import for GitHubProfileCard component
5656 const frontmatter = `---
5757title: "Monthly Report: ${ monthYear } "
5858date: ${ dateStr }
5959tags: [monthly-report, project-activity]
6060---
6161
62- ${ newContributors . length > 0 ? " import GitHubProfileCard from '@site/src/components/GitHubProfileCard';\n" : "" }
62+ import GitHubProfileCard from '@site/src/components/GitHubProfileCard';
6363` ;
6464
6565 // Generate summary section
@@ -337,38 +337,42 @@ ${itemsList}
337337}
338338
339339/**
340- * Generate contributors section with thank you list and new contributor highlights
340+ * Generate contributors section with GitHubProfileCard components
341341 *
342342 * @param {Array<string> } contributors - All contributor usernames
343343 * @param {Array<string> } newContributors - First-time contributor usernames
344344 * @returns {string } Markdown section
345345 */
346346function generateContributorsSection ( contributors , newContributors ) {
347- // Use zero-width space after @ to prevent GitHub notifications
348- const contributorList = contributors
349- . map ( ( username ) => `@\u200B${ username } ` )
350- . join ( ", " ) ;
351-
352- let section = `## 👥 Contributors
353-
354- Thank you to all contributors this period: ${ contributorList } ` ;
347+ let section = "" ;
355348
349+ // Section 1: New Contributors (highlighted, shown first)
356350 if ( newContributors . length > 0 ) {
357- section += `\n\n### 🎉 New Contributors\n\nWelcome to our new contributors!\n\n` ;
351+ section += `## 🌟 New Contributors\n\nWelcome to our new contributors!\n\n` ;
352+ section += `<div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: '1.5rem', marginBottom: '2rem' }}>\n\n` ;
358353
359- // Use GitHubProfileCard component for each new contributor in grid (matching donations page style)
360- section += `<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(400px, 1fr))', gap: '1.5rem', marginBottom: '2rem' }}>\n\n` ;
361-
362- const profileCards = newContributors
354+ const newContributorCards = newContributors
363355 . map (
364356 ( username ) =>
365- `<GitHubProfileCard username="${ username } " title="New Contributor" />` ,
357+ `<GitHubProfileCard username="${ username } " highlight={true} />` ,
366358 )
367359 . join ( "\n\n" ) ;
368360
369- section += profileCards ;
370- section += `\n\n</div>` ;
361+ section += newContributorCards ;
362+ section += `\n\n</div>\n\n ` ;
371363 }
372364
365+ // Section 2: All Contributors (without highlight)
366+ section += `## 👥 Contributors\n\n` ;
367+ section += `Thank you to everyone who contributed this period!\n\n` ;
368+ section += `<div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: '1.5rem', marginBottom: '2rem' }}>\n\n` ;
369+
370+ const allContributorCards = contributors
371+ . map ( ( username ) => `<GitHubProfileCard username="${ username } " />` )
372+ . join ( "\n\n" ) ;
373+
374+ section += allContributorCards ;
375+ section += `\n\n</div>` ;
376+
373377 return section ;
374378}
0 commit comments