Use siteTitle variable instead of hardcoding the title

On today's talk in BADCamp, Kyle tried to modify the title in the configuration, but it was hardcoded :-p
This commit is contained in:
Joaquin Bravo Contreras 2018-10-26 14:52:22 -07:00
parent 2670ccbbd5
commit db9c9062e8
3 changed files with 5 additions and 5 deletions

View file

@ -5,7 +5,7 @@ import { rhythm, scale } from '../utils/typography'
class Template extends React.Component {
render() {
const { location, children } = this.props
const { location, title, children } = this.props
const rootPath = `${__PATH_PREFIX__}/`
let header
@ -26,7 +26,7 @@ class Template extends React.Component {
}}
to={'/'}
>
Gatsby Starter Blog
{title}
</Link>
</h1>
)
@ -47,7 +47,7 @@ class Template extends React.Component {
}}
to={'/'}
>
Gatsby Starter Blog
{title}
</Link>
</h3>
)

View file

@ -17,7 +17,7 @@ class BlogIndex extends React.Component {
const posts = get(this, 'props.data.allMarkdownRemark.edges')
return (
<Layout location={this.props.location}>
<Layout location={this.props.location} title={siteTitle}>
<Helmet
htmlAttributes={{ lang: 'en' }}
meta={[{ name: 'description', content: siteDescription }]}

View file

@ -15,7 +15,7 @@ class BlogPostTemplate extends React.Component {
const { previous, next } = this.props.pageContext
return (
<Layout location={this.props.location}>
<Layout location={this.props.location} title={siteTitle}>
<Helmet
htmlAttributes={{ lang: 'en' }}
meta={[{ name: 'description', content: siteDescription }]}