feat: map author details to blog post
This commit is contained in:
@ -13,7 +13,7 @@ const discussUrl = (slug) =>
|
||||
|
||||
const postDateTemplate = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }
|
||||
|
||||
export default function PostLayout({ children, frontMatter, next, prev }) {
|
||||
export default function PostLayout({ frontMatter, authorDetails, next, prev, children }) {
|
||||
const { slug, fileName, date, title, tags } = frontMatter
|
||||
|
||||
return (
|
||||
@ -50,14 +50,14 @@ export default function PostLayout({ children, frontMatter, next, prev }) {
|
||||
<img src={siteMetadata.image} alt="avatar" className="w-10 h-10 rounded-full" />
|
||||
<dl className="text-sm font-medium leading-5 whitespace-nowrap">
|
||||
<dt className="sr-only">Name</dt>
|
||||
<dd className="text-gray-900 dark:text-gray-100">{siteMetadata.author}</dd>
|
||||
<dd className="text-gray-900 dark:text-gray-100">{authorDetails.name}</dd>
|
||||
<dt className="sr-only">Twitter</dt>
|
||||
<dd>
|
||||
<Link
|
||||
href={siteMetadata.twitter}
|
||||
href={authorDetails.twitter}
|
||||
className="text-blue-500 hover:text-blue-600 dark:hover:text-blue-400"
|
||||
>
|
||||
{siteMetadata.twitter.replace('https://twitter.com/', '@')}
|
||||
{authorDetails.twitter.replace('https://twitter.com/', '@')}
|
||||
</Link>
|
||||
</dd>
|
||||
</dl>
|
||||
|
Reference in New Issue
Block a user