mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +02:00
added authors to archive (tech spotlight) templates (#424)
Co-authored-by: Xetera <[email protected]>
This commit is contained in:
@@ -9,7 +9,7 @@ import { PageContent } from "../components/PageContent"
|
|||||||
// @todo maybe find alternative type for data
|
// @todo maybe find alternative type for data
|
||||||
const Archive: FC<any> = ({ data }) => {
|
const Archive: FC<any> = ({ data }) => {
|
||||||
const { relativePath, ctime } = data.file
|
const { relativePath, ctime } = data.file
|
||||||
const { body, excerpt, timeToRead } = data.file.post
|
const { body, excerpt, fields, timeToRead } = data.file.post
|
||||||
|
|
||||||
const title = humanize(relativePath)
|
const title = humanize(relativePath)
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ const Archive: FC<any> = ({ data }) => {
|
|||||||
relativePath={relativePath}
|
relativePath={relativePath}
|
||||||
basePath="/archives"
|
basePath="/archives"
|
||||||
title={title}
|
title={title}
|
||||||
|
authors={fields.authors}
|
||||||
createdAt={ctime}
|
createdAt={ctime}
|
||||||
timeToRead={timeToRead}
|
timeToRead={timeToRead}
|
||||||
shifted={false}
|
shifted={false}
|
||||||
@@ -39,6 +40,13 @@ export const query = graphql`
|
|||||||
post: childMdx {
|
post: childMdx {
|
||||||
body
|
body
|
||||||
excerpt
|
excerpt
|
||||||
|
fields {
|
||||||
|
authors {
|
||||||
|
name
|
||||||
|
hash
|
||||||
|
avatar
|
||||||
|
}
|
||||||
|
}
|
||||||
timeToRead
|
timeToRead
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user