Starts with path targeting

What are you trying to accomplish

  • I’m trying to have a sub path or child path (e.g. /blog-individual/{childpath which is the blog id}) for my page so I used the StartsWith in targeting, but after I ran it with gatsby, the page couldn’t be found. Did I set it up wrong?

dynamic URL paths wouldn’t work with Gatsby out of the box due to Gatsby’s static nature [all URLs must be known at build time]

You’d want to create each page explicitly in your gatsby-node file:

exports.createPages = ({ graphql, actions }) => {
  const { createPage } = actions;
  // fetch all blogs from your source and create a page for each
        path: `/blog-individual/${blog.slug}/`,
        component: path.resolve(`./src/templates/blog-page-template.tsx`);

Will try this out @aziz . Thank you! :slightly_smiling_face: