0

I have a field in the frontmatter for a page my_field: /contact/. When I query this field on my page it gets transformed into ../pages/contact but I want it to be exactly what I typed, just /contact/.

How do I prevent Gatsby from transforming my string field into a relative path?

edit: I do have a page that comes from '/pages/contact.js' My custom field comes from a configurable nav that is trying to link to that page. I want to pass /contact/ in the Gatsby Link to param. But typing /contact/ into the field comes through as ../pages/contact.

Jake
  • 383
  • 6
  • 26
  • Is it that you have a file called `contact.js`? And, if so, where is located? If your site is up and running at `localhost:8000` and you try to go to `localhost:8000/contact`, you'll need to have a file called `contact.js` in `src/pages`. Gatsby takes care of this routing automatically. Or, have I misunderstood your situation? – Will Ward Aug 29 '20 at 00:11
  • Do you have any code to look at? – Will Ward Aug 30 '20 at 03:59

0 Answers0