mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-07 07:56:12 +02:00
feat(resources): improve SEO by attaching excerpt as description
This commit is contained in:
@@ -9,11 +9,11 @@ import "katex/dist/katex.min.css"
|
|||||||
// @todo maybe find alternative type for data
|
// @todo maybe find alternative type for data
|
||||||
const LanguagePost: FC<any> = ({ data }) => {
|
const LanguagePost: FC<any> = ({ data }) => {
|
||||||
const { relativePath } = data.file
|
const { relativePath } = data.file
|
||||||
const { html, fields, frontmatter, timeToRead } = data.file.post
|
const { html, excerpt, fields, frontmatter, timeToRead } = data.file.post
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<SEO title={frontmatter.title} />
|
<SEO title={frontmatter.title} description={excerpt} />
|
||||||
<ResourceHeader
|
<ResourceHeader
|
||||||
relativePath={relativePath}
|
relativePath={relativePath}
|
||||||
title={frontmatter.title}
|
title={frontmatter.title}
|
||||||
@@ -36,6 +36,7 @@ export const query = graphql`
|
|||||||
relativePath
|
relativePath
|
||||||
post: childMarkdownRemark {
|
post: childMarkdownRemark {
|
||||||
html
|
html
|
||||||
|
excerpt
|
||||||
fields {
|
fields {
|
||||||
authors {
|
authors {
|
||||||
name
|
name
|
||||||
|
|||||||
Reference in New Issue
Block a user