I want to pass data from a markdown file called index.md
(edited via NetlifyCMS) to the index page.
If i use createPages
as per the documentation and define a template for that file to build from it builds fine and I get a page at siteurl.com/index
but my browser shows my 404 error page when going to siteurl.com
Couldn't see documentation anywhere? Can't imagine this is too hard?
Figured a work around out for my use case
I have the same problem. I'd like to get an answer to this question. Could it be reopened please?
Okay, it's actually trivially possible by passing path: "/"
to createPage
.
createPage({
path: `/`,
component: path.resolve("./src/components/siteRoot.js"),
context: {
repo_a: data.github.repositoryOwner.repositories.nodes,
}
})
Most helpful comment
Okay, it's actually trivially possible by passing
path: "/"
tocreatePage
.