Skip to content

Instantly share code, notes, and snippets.

View mark-casias's full-sized avatar
🎸
Working from home

Mark Casias mark-casias

🎸
Working from home
View GitHub Profile
const path = require(`path`)
exports.createPages = async ({ actions, graphql }) => {
const { createPage, createRedirect } = actions
const createNode = (entities, createPage, template) =>
entities.forEach(node => {
if (node) {
createPage({
path: node.path.alias,