Merge pull request #158 from the-programmers-hangout/feat-improve-seo

feat(resources): improve SEO by attaching excerpt as description
This commit is contained in:
Jean-Philippe Sirois
2019-11-06 09:29:52 -08:00
committed by GitHub
+3 -2
View File
@@ -9,11 +9,11 @@ import "katex/dist/katex.min.css"
// @todo maybe find alternative type for data
const LanguagePost: FC<any> = ({ data }) => {
const { relativePath } = data.file
const { html, fields, frontmatter, timeToRead } = data.file.post
const { html, excerpt, fields, frontmatter, timeToRead } = data.file.post
return (
<Fragment>
<SEO title={frontmatter.title} />
<SEO title={frontmatter.title} description={excerpt} />
<ResourceHeader
relativePath={relativePath}
title={frontmatter.title}
@@ -36,6 +36,7 @@ export const query = graphql`
relativePath
post: childMarkdownRemark {
html
excerpt
fields {
authors {
name