Is there a way to add a file in the pages
directory in Gatsby and not have it turn into a page?
For instance, let's say that I have a contact page which has a contact form. I would like to create a contact folder, which has within it an index.js
file as well as a contact-form.js
file. I.e., a structure like this:
src
- pages
- contact
- index.js
- contact-form.js
The idea is that that the index.js
file would import the contact form component from the contact-form.js
file. But there would not be a contact/contact-us
page.
Is there some way to do this with Gatsby? If so, how?