To create a page programmatically you need to a few things.
under src
create a folder called templates
and inside of that create a file called pokemon.js
.
in the root of the project create a gatsby-node.js
file and add the following code
const path = require(`path`)
exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions
const templatePath = path.resolve(
'./src/templates/pokemon.js'
)
// use the createPage function to create a page.
// the createPage function accepts an object as a config
// {
// path: // the path to the page, we want it to be `/user`
// component: // the path to the component file
// }
}