Skip to content

Commit

Permalink
Merge pull request #1 from MMazoni/migration-gatsby-v5
Browse files Browse the repository at this point in the history
migration to v5
  • Loading branch information
MMazoni authored Aug 14, 2024
2 parents 2a0eee7 + b964217 commit d660483
Show file tree
Hide file tree
Showing 5 changed files with 6,825 additions and 19,346 deletions.
35 changes: 16 additions & 19 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,21 @@ module.exports = {
})
})
},
query: `
{
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] },
) {
nodes {
excerpt
html
fields {
slug
}
frontmatter {
title
date
}
}
}
}
`,
query: `{
allMarkdownRemark(sort: {frontmatter: {date: DESC}}) {
nodes {
excerpt
html
fields {
slug
}
frontmatter {
title
date
}
}
}
}`,
output: "/rss.xml",
title: "Matheus Mazoni Blog RSS Feed",
},
Expand Down Expand Up @@ -149,4 +145,5 @@ module.exports = {
},
},
],
trailingSlash: `always`,
}
23 changes: 9 additions & 14 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@ exports.createPages = async ({ graphql, actions, reporter }) => {

// Get all markdown blog posts sorted by date
const result = await graphql(
`
{
allMarkdownRemark(
sort: { fields: [frontmatter___date], order: ASC }
limit: 1000
) {
nodes {
id
fields {
slug
}
}
}
`{
allMarkdownRemark(sort: {frontmatter: {date: ASC}}, limit: 1000) {
nodes {
id
fields {
slug
}
`
}
}
}`
)

if (result.errors) {
Expand Down
Loading

0 comments on commit d660483

Please sign in to comment.