From a6a9d53665741727faefdfef1796df974cba137c Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Fri, 13 Aug 2021 16:26:51 +0300 Subject: [PATCH] Add check for authorTitle --- .../src/theme/BlogPostItem/index.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx index b796c2861e16..325b559c4600 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx @@ -114,9 +114,12 @@ function BlogPostItem(props: Props): JSX.Element { {author} - - {authorTitle} - + + {authorTitle && ( + + {authorTitle} + + )} )} @@ -134,15 +137,18 @@ function BlogPostItem(props: Props): JSX.Element { itemScope itemType="http://schema.org/BlogPosting"> {renderPostHeader()} + {image && ( )} +
{children}
+ {(tags.length > 0 || truncated) && (