Skip to content

Commit

Permalink
Merge branch 'feature/hierarchy'
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-simpson committed Mar 19, 2019
2 parents 767f00c + c1a5582 commit eccdc4c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ exports.sourceNodes = async (
const results = response.results.filter(result => result.type === 'page')

// Parse into nodes and add to GraphQL schema
results.forEach(pageResult => {
const node = formatPageNode(createNodeHelperFunctions, pageResult, baseUrl)
//TODO: figure out how to set up page hierarchy
const nodes = results.map(pageResult =>
formatPageNode(createNodeHelperFunctions, pageResult, baseUrl)
)

nodes.forEach(node => {
// Create node
createNode(node)
})
}
Expand Down Expand Up @@ -53,6 +56,7 @@ const formatPageNode = (
email: result.history.createdBy.email,
},
bodyHtml: result.body.view.value,
ancestorIds: result.ancestors.map(x => x.id),
}

const nodeId = createNodeId(`confluence-page-${content.confluenceId}`)
Expand Down

0 comments on commit eccdc4c

Please sign in to comment.