+ {(frontmatter.authors || []).map(
+ (author: Author, index: number) => (
+
2
+ ? 'h-8 w-8'
+ : 'h-11 w-11'
+ }`}
+ style={{
+ backgroundImage: `url(${author.photo})`,
+ zIndex: 10 - index,
+ }}
+ />
+ ),
+ )}
+
+
+
+ {frontmatter.authors.length > 2 ? (
+ <>
+ {frontmatter.authors
+ .slice(0, 2)
+ .map((author: Author, index: number) => (
{author.name}
- {index < frontmatter.authors.length - 1 &&
- ' & '}
+ {index === 0 && ' & '}
- ),
- )
- )}
-
-
-
- {frontmatter.date && (
-
- {date.toLocaleDateString('en-us', {
- year: 'numeric',
- month: 'long',
- day: 'numeric',
- })}
-
- )}{' '}
- · {timeToRead} min read
-
+ ))}
+ {'...'}
+
+ ) : (
+ frontmatter.authors.map(
+ (author: Author, index: number) => (
+
+ {author.name}
+ {index < frontmatter.authors.length - 1 &&
+ ' & '}
+
+ ),
+ )
+ )}
+
+
+ {frontmatter.date && (
+
+ {date.toLocaleDateString('en-us', {
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ })}
+
+ )}{' '}
+ · {postTimeToRead} min read