Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Upgrade/gatsby 5 #276

Open
wants to merge 4 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,5 @@ module.exports = {
// To learn more, visit: https://gatsby.dev/offline
// `gatsby-plugin-offline`,
],
trailingSlash: "always",
};
66 changes: 31 additions & 35 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,45 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
const eventsArchiveTemplate = path.resolve(
`src/templates/events/past-events-template.js`
);
const result = await graphql(`
{
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___title] }
limit: 10
filter: { fileAbsolutePath: { regex: "/data/platforms/" } }
) {
edges {
node {
frontmatter {
path
}
}
const result = await graphql(`{
allMarkdownRemark(
sort: {frontmatter: {title: DESC}}
limit: 10
filter: {fileAbsolutePath: {regex: "/data/platforms/"}}
) {
edges {
node {
frontmatter {
path
}
}
allRedirectsJson {
edges {
node {
from
to
}
}
}
}
allRedirectsJson {
edges {
node {
from
to
}
}
`);
}
}`);

const newsResults = await graphql(`
{
allMarkdownRemark(sort: { fields: frontmatter___date, order: ASC }) {
edges {
node {
fileAbsolutePath
frontmatter {
path
title
date(formatString: "MMMM DD, YYYY")
tags
}
}
const newsResults = await graphql(`{
allMarkdownRemark(sort: {frontmatter: {date: ASC}}) {
edges {
node {
fileAbsolutePath
frontmatter {
path
title
date(formatString: "MMMM DD, YYYY")
tags
}
}
}
`);
}
}`);
// Handle errors
if (result.errors) {
reporter.panicOnBuild(`Error while running GraphQL query.`);
Expand Down
Loading