Skip to content

Commit

Permalink
added description prop to blog and resource templates
Browse files Browse the repository at this point in the history
Signed-off-by: Mohith234 <[email protected]>
  • Loading branch information
Mohith234 committed Sep 7, 2023
1 parent 1a44b1a commit a98da0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/templates/blog-single.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const query = graphql`query BlogsBySlug($slug: String!) {
frontmatter {
title
subtitle
description
date(formatString: "MMMM Do, YYYY")
author
category
Expand Down Expand Up @@ -62,5 +63,5 @@ export default BlogSinglePage;


export const Head = ({ data }) => {
return <SEO title={data.mdx.frontmatter.title} image={data.mdx.frontmatter.thumbnail.publicURL} />;
return <SEO title={data.mdx.frontmatter.title} image={data.mdx.frontmatter.thumbnail.publicURL} description={data.mdx.frontmatter.description} />;
};
3 changes: 2 additions & 1 deletion src/templates/resource-single.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const query = graphql`query ResourcesBySlug($slug: String!) {
author
category
tags
description
thumbnail {
childImageSharp {
gatsbyImageData(width: 500, layout: CONSTRAINED)
Expand Down Expand Up @@ -54,5 +55,5 @@ const ResourceSinglePage = ({ data }) => {
export default ResourceSinglePage;

export const Head = ({ data }) => {
return <SEO title={data.mdx.frontmatter.title} image={data.mdx.frontmatter.thumbnail.publicURL} />;
return <SEO title={data.mdx.frontmatter.title} image={data.mdx.frontmatter.thumbnail.publicURL} description={data.mdx.frontmatter.description}/>;
};

0 comments on commit a98da0e

Please sign in to comment.