-
Notifications
You must be signed in to change notification settings - Fork 0
/
gatsby-node.js
28 lines (27 loc) · 1 KB
/
gatsby-node.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
exports.createPages = ({ actions: { createPage } }) => {
const project = require("./data/students.json");
project.forEach((project) => {
createPage({
path: `${project.whatIsYourPreferredFirstName}` + `${project.whatIsYourPreferredLastName}`,
component: require.resolve("./src/templates/project.js"),
context: {
email: project.emailAddress,
firstName: project.whatIsYourPreferredFirstName,
lastName: project.whatIsYourPreferredLastName,
projectName: project.whatIsTheNameOfYourProject,
website: project.ifYouHaveAWebsitePleaseAddItHere,
instagram: project.ifYouHaveAnInstagramHandlePleaseAddItHere,
projectSummary: project.writeASummaryOfYourProject,
projectProcess: project.writeASummaryOfTheProcessOfYourProject,
},
});
});
};
// Hide source in Webpack
exports.onCreateWebpackConfig = ({ getConfig, actions }) => {
if (getConfig().mode === 'production') {
actions.setWebpackConfig({
devtool: false
});
}
};