Skip to content

Commit bdcf0f1

Browse files
authored
Merge pull request #372 from snak1t/feature/blog_sorting
Sort blog posts by date field
2 parents 11325bc + 4a4b51b commit bdcf0f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pages/blog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default mapProps(({ data: { allMarkdownRemark: { edges } } }) => ({
4545

4646
export let pageQuery = graphql`
4747
query AllPosts {
48-
allMarkdownRemark {
48+
allMarkdownRemark(sort: { fields: frontmatter___date, order: DESC }) {
4949
edges {
5050
node {
5151
id

0 commit comments

Comments
 (0)