We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03df4d4 commit 990a13eCopy full SHA for 990a13e
src/pages/blog/all.html.js
@@ -76,18 +76,22 @@ const AllBlogPosts = ({data}: Props) => (
76
</Link>
77
</h2>
78
<MetaTitle>{node.fields.date}</MetaTitle>
79
- <div
80
- css={{
81
- color: colors.subtle,
82
- marginTop: -5,
83
- }}>
84
- by{' '}
85
- {toCommaSeparatedList(node.frontmatter.author, author => (
86
- <span key={author.frontmatter.name}>
87
- {author.frontmatter.name}
88
- </span>
89
- ))}
90
- </div>
+ {node.frontmatter.author ? (
+ <div
+ css={{
+ color: colors.subtle,
+ marginTop: -5,
+ }}>
+ by{' '}
+ {toCommaSeparatedList(node.frontmatter.author, author => (
+ <span key={author.frontmatter.name}>
+ {author.frontmatter.name}
+ </span>
+ ))}
91
+ </div>
92
+ ) : (
93
+ <div />
94
+ )}
95
</li>
96
))}
97
</ul>
0 commit comments