Migrate to new schema for users

This commit is contained in:
Corbin Crutchley
2019-08-10 11:17:24 -07:00
parent 00c5140df8
commit 26847a10b2
9 changed files with 31 additions and 21 deletions

View File

@@ -26,7 +26,7 @@ exports.createPages = ({ graphql, actions }) => {
}
}
}
allAuthorsJson(limit: 100) {
allUsersJson(limit: 100) {
edges {
node {
id
@@ -42,7 +42,7 @@ exports.createPages = ({ graphql, actions }) => {
// Create blog posts pages.
const posts = result.data.allMarkdownRemark.edges
const authors = result.data.allAuthorsJson.edges
const authors = result.data.allUsersJson.edges
posts.forEach((post, index, arr) => {
const previous = index === arr.length - 1 ? null : arr[index + 1].node