Nuxt route resolve

If you plan to have the 'about-type' as a UID you can overcome the hyphen issue on 'about-me' by creating a relationship back to the parent 'about-me' document and using a resolver.

For example, your uid page 'about type' has a relationship field 'link_to_about' that you link to 'about-me' in Prismic.

Then you can use the resolver like so:

{
  type: "about-type",
  path: "/:about/:uid",
  resolvers: {
    about: "link_to_about"
  }
}
3 Likes