We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to apply seo and social sharing cards tutorial to my project.
While developing this tutorial to my project, I found unused variable even declared and wrong propTypes.
Some recommended topics to cover:
const { previous, next } = this.props.pageContext
import React from "react" import { Link, graphql } from "gatsby" import Bio from "../components/bio" import Layout from "../components/layout" import SEO from "../components/seo" import { rhythm, scale } from "../utils/typography" class BlogPostTemplate extends React.Component { render() { const post = this.props.data.markdownRemark const siteTitle = this.props.data.site.siteMetadata.title const { previous, next } = this.props.pageContext const image = post.frontmatter.image ? post.frontmatter.image.childImageSharp.resize : null return ( <Layout location={this.props.location} title={siteTitle}> <SEO title={post.frontmatter.title} description={post.frontmatter.description || post.excerpt} image={image} pathname={this.props.location.pathname} /> <h1>{post.frontmatter.title}</h1> <div dangerouslySetInnerHTML={{ __html: post.html }} /> </Layout> ) } } export default BlogPostTemplate export const pageQuery = graphql` query BlogPostBySlug($slug: String!) { site { siteMetadata { title author } } markdownRemark(fields: { slug: { eq: $slug } }) { id excerpt(pruneLength: 160) html frontmatter { title description image: featured { childImageSharp { resize(width: 1200) { src height width } } } } } } `
src: PropTypes.string.isRequired, height: PropTypes.string.isRequired, width: PropTypes.string.isRequired, })
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Summary
I am trying to apply seo and social sharing cards tutorial to my project.
While developing this tutorial to my project, I found unused variable even declared and wrong propTypes.
Some recommended topics to cover:
const { previous, next } = this.props.pageContext
should be erased.Motivation
Steps to resolve this issue
Draft the doc
Open a pull request
The text was updated successfully, but these errors were encountered: