I created a set of pages using {mdx.slug} under src\pages\mountains and they work fine. If I duplicate the same .mdx file in the path src\pages\cycling I notice the new pages will be under mountains and not under the other (in the browser).
In fact, under cyclyng I will the 404 page.
Do you have any idea about the issue?
I think the point is in my graphql query:
export const query = graphql`
query($slug: String) {
mdx(slug: {eq: $slug}) {
body
frontmatter {
title
date(formatString: "MMMM DD, YYYY")
hero_image_alt
hero_image_credit_link
hero_image_credit_text
hero_image {
childImageSharp {
gatsbyImageData
}
}
}
}
}
`
Using $slug I can read the whole list of pages, not only the ones under a single path (eg. src\pages\mountains)
- I just performed a
gatsby clean Gatsby.js development 404 page: Imgur