Fixes /404/ test in post path. Issue #44

This commit is contained in:
Matt 2017-10-01 19:48:01 -05:00
parent 08aad1e22f
commit 894e6708f4
2 changed files with 11 additions and 802 deletions

View file

@ -13,10 +13,10 @@ class BlogIndex extends React.Component {
return (
<div>
<Helmet title={get(this, 'props.data.site.siteMetadata.title')} />
<Helmet title={siteTitle} />
<Bio />
{posts.map(post => {
if (post.node.path !== '/404/') {
if (post.node.frontmatter.path !== '/404/') {
const title = get(post, 'node.frontmatter.title') || post.node.path
return (
<div key={post.node.frontmatter.path}>
@ -29,7 +29,7 @@ class BlogIndex extends React.Component {
style={{ boxShadow: 'none' }}
to={post.node.frontmatter.path}
>
{post.node.frontmatter.title}
{title}
</Link>
</h3>
<small>{post.node.frontmatter.date}</small>