From 4a4b51b54b4b9e177fb5d4195eb4186f018a603d Mon Sep 17 00:00:00 2001 From: Ruslan Abramov Date: Thu, 18 Oct 2018 23:25:54 +0300 Subject: [PATCH] Sort blog posts by date field --- src/pages/blog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/blog.js b/src/pages/blog.js index 93f904437..815a830af 100644 --- a/src/pages/blog.js +++ b/src/pages/blog.js @@ -45,7 +45,7 @@ export default mapProps(({ data: { allMarkdownRemark: { edges } } }) => ({ export let pageQuery = graphql` query AllPosts { - allMarkdownRemark { + allMarkdownRemark(sort: { fields: frontmatter___date, order: DESC }) { edges { node { id