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

@@ -52,7 +52,7 @@ const createPages: GatsbyNode["createPages"] = async ({ graphql, actions }) => {
createPage({
path: node.fields.slug,
component: constants.templates.postTemplate,
context: { slug: node.fields.slug },
context: { slug: node.fields.slug, readingTime: node?.fields?.readingTime },
});
}
});