Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit f3c15dc

Browse files
committed
Update queries
1 parent a2691a8 commit f3c15dc

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

gatsby-config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,14 @@ const config: GatsbyConfig = {
192192
},
193193
query: `
194194
{
195-
allMarkdownRemark(
196-
sort: { order: DESC, fields: [frontmatter___date] },
197-
) {
195+
allMarkdownRemark(sort: {frontmatter: {date: DESC}}) {
198196
edges {
199197
node {
200198
excerpt
201199
html
202-
fields { slug }
200+
fields {
201+
slug
202+
}
203203
frontmatter {
204204
title
205205
date

src/logic/algolia.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
const indexName = `fabrizioduroni.it`;
22
const blogPostsQuery = `{
3-
pages: allMarkdownRemark(
4-
sort: { order: DESC, fields: [frontmatter___date] },
5-
) {
6-
edges {
7-
node {
8-
id
9-
fields {
10-
slug
11-
}
12-
frontmatter {
13-
title
14-
description
15-
authors
16-
tags
17-
}
3+
pages: allMarkdownRemark(sort: {frontmatter: {date: DESC}}) {
4+
edges {
5+
node {
6+
id
7+
fields {
8+
slug
9+
}
10+
frontmatter {
11+
title
12+
description
13+
authors
14+
tags
1815
}
1916
}
2017
}
2118
}
19+
}
2220
`;
2321

2422
const pageToAlgoliaRecord = ({

0 commit comments

Comments
 (0)