Skip to content

Commit

Permalink
minor improvements around digital dialogues
Browse files Browse the repository at this point in the history
  • Loading branch information
raffazizzi committed Mar 14, 2024
1 parent fc39477 commit 1a0f2b0
Show file tree
Hide file tree
Showing 18 changed files with 17,340 additions and 51,675 deletions.
18 changes: 9 additions & 9 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ async function makePeople(createPage, graphql) {
) {
nodes {
name
airtable_id
fields {
headshot {
childImageSharp {
Expand All @@ -142,7 +143,6 @@ async function makePeople(createPage, graphql) {
research_interests
people_groups
new_id
id
}
}
}
Expand All @@ -155,7 +155,7 @@ async function makePeople(createPage, graphql) {
person.bio = person.fields.peopleBio ? person.fields.peopleBio.childMarkdownRemark.html : person.bio
}
createPage({
path: `/people/${person.id}/`,
path: `/people/${person.airtable_id}/`,
component: require.resolve(`./src/templates/person.js`),
context: {
...person
Expand Down Expand Up @@ -263,7 +263,7 @@ async function makeResearch(createPage, graphql) {
query {
allResearchJson {
nodes {
id
airtable_id
fields {
researchDescription {
childMarkdownRemark {
Expand Down Expand Up @@ -365,7 +365,7 @@ async function makeResearch(createPage, graphql) {
for (const node of results.data.allResearchJson.nodes) {
const item = node
createPage({
path: `/research/${item.id}/`,
path: `/research/${item.airtable_id}/`,
component: require.resolve(`./src/templates/research.js`),
context: {
...item
Expand Down Expand Up @@ -410,7 +410,7 @@ async function makeEvents(createPage, graphql) {
query {
allEventsJson {
nodes {
id
airtable_id
fields {
eventsDescription {
childMarkdownRemark {
Expand Down Expand Up @@ -569,15 +569,15 @@ async function makeEvents(createPage, graphql) {
})
node.research.forEach(rr => {
results.data.allResearchJson.nodes.map(research => {
if (research.id === rr.id) {
if (research.airtable_id === rr.airtable_id) {
if (research.fields) {
rr.image = research.fields.image
}
}
})
})
createPage({
path: `/events/${node.id}/`,
path: `/events/${node.airtable_id}/`,
component: require.resolve(`./src/templates/event.js`),
context: {
...node
Expand Down Expand Up @@ -652,7 +652,7 @@ async function makeDialogues(createPage, graphql) {
}
) {
nodes {
id
airtable_id
fields {
eventsDescription {
childMarkdownRemark {
Expand Down Expand Up @@ -773,7 +773,7 @@ async function makeDialogues(createPage, graphql) {
})
})
createPage({
path: `/digital-dialogues/${node.id}/`,
path: `/digital-dialogues/${node.airtable_id}/`,
component: require.resolve(`./src/templates/dialogue.js`),
context: {
...node
Expand Down
Loading

0 comments on commit 1a0f2b0

Please sign in to comment.