From 3002bac1ed560e0d9773ddfbcd49ce6c41b2022e Mon Sep 17 00:00:00 2001 From: Andrew Berry Date: Wed, 14 Sep 2022 04:03:23 -0400 Subject: [PATCH] fix: Sort by title if the date matches (#65) * fix: Sort by title if the date matches * fix: Sort title ascending --- packages/gatsby-theme-adr/src/components/AdrsTimeline.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-theme-adr/src/components/AdrsTimeline.tsx b/packages/gatsby-theme-adr/src/components/AdrsTimeline.tsx index 080cbca..2120898 100644 --- a/packages/gatsby-theme-adr/src/components/AdrsTimeline.tsx +++ b/packages/gatsby-theme-adr/src/components/AdrsTimeline.tsx @@ -5,7 +5,13 @@ import TagList from './TagList'; const query = graphql` query LatestAdrs { - allMdx(sort: { order: DESC, fields: frontmatter___date }, limit: 8) { + allMdx( + sort: { + order: [DESC, ASC] + fields: [frontmatter___date, frontmatter___title] + } + limit: 8 + ) { edges { node { frontmatter {