We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 32a8b79 + b663a84 commit e078bc9Copy full SHA for e078bc9
src/pages/index.js
@@ -14,7 +14,6 @@ export default class IndexPage extends React.Component {
14
<h1 className="has-text-weight-bold is-size-2">Latest Stories</h1>
15
</div>
16
{posts
17
- .filter(post => post.node.frontmatter.templateKey === 'blog-post')
18
.map(({ node: post }) => (
19
<div
20
className="content"
@@ -54,7 +53,10 @@ IndexPage.propTypes = {
54
53
55
export const pageQuery = graphql`
56
query IndexQuery {
57
- allMarkdownRemark(sort: { order: DESC, fields: [frontmatter___date] }) {
+ allMarkdownRemark(
+ sort: { order: DESC, fields: [frontmatter___date] },
58
+ filter: { frontmatter: { templateKey: { eq: "blog-post" } }}
59
+ ) {
60
edges {
61
node {
62
excerpt(pruneLength: 400)
0 commit comments