feat: add authorName and editorName attributes to Strapi blog schema for dynamic author display
This commit is contained in:
@@ -145,7 +145,11 @@ export default function BlogDetailPage({ blog, allBlogs = [], isMobile, onNaviga
|
||||
const bgPatternUrl = assetUrl('/assets/Background pattern About Us Hero section.svg');
|
||||
const spotlightUrl = assetUrl('/assets/Spotlight vector.svg');
|
||||
|
||||
const authorName = typeof blog.author === 'string' ? blog.author : (blog.author?.firstname ? `${blog.author.firstname} ${blog.author.lastname || ''}`.trim() : 'Purushothaman Gopalan');
|
||||
const authorName = (typeof blog.authorName === 'string' && blog.authorName.trim())
|
||||
? blog.authorName.trim()
|
||||
: (typeof blog.author === 'string' && blog.author.trim()
|
||||
? blog.author.trim()
|
||||
: (blog.author?.firstname ? `${blog.author.firstname} ${blog.author.lastname || ''}`.trim() : 'Cavin Editorial Team'));
|
||||
const authorRole = typeof blog.authorDesignation === 'string' ? blog.authorDesignation : 'Chief AI Architect & Head of Data Engineering';
|
||||
const authorAvatar = '/assets/arvindh_agentic_ai.jpg';
|
||||
const relatedArticles = allBlogs.filter(b => b.id !== blog.id).slice(0, 2);
|
||||
|
||||
Reference in New Issue
Block a user