added read time on index and post pages

This commit is contained in:
2022-09-29 22:28:06 +02:00
parent 619758c175
commit 6a9ceb9670
22 changed files with 103 additions and 50 deletions

View File

@@ -13,13 +13,13 @@ interface Props {
const Post: React.FC<Props> = ({ post }: Props) => {
const { html } = post;
const { tagSlugs, slug } = post.fields;
const { tagSlugs, slug, readingTime } = post.fields;
const { tags, title, date, disqusId } = post.frontmatter;
return (
<div className={styles.post}>
<div className={styles.content}>
<Content body={html} title={title} />
<Content body={html} title={title} subTitle={readingTime?.text} />
</div>
<div className={styles.footer}>