# Nuxt with SM Routes

**URL:** <https://community.prismic.io/t/nuxt-with-sm-routes/2723>\
**Category:** Developing with Prismic\
**Tags:** nuxtjs\
**Created:** [November 17, 2020, 4:12am UTC](https://community.prismic.io/t/nuxt-with-sm-routes/2723 "2020-11-17T04:12:09Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [March 2, 2021, 11:17am UTC](https://community.prismic.io/t/nuxt-with-sm-routes/2723/31 "2021-03-02T11:17:30Z")

</div>

Hello @arcaneshawn,

I have discussed this with our dedicated developer. Here are some bits to help you on that one:

**Mapping URLs:**  
If you are using the `apiOptions.routes` feature that is not able to do that kind of programmatic parsing, unfortunately. I'd recommend using a link resolver here, something like that:

```
// linkResolver.js
module.exports = doc => {
  const [site, uid] = doc.uid.split("--");

  switch(doc.type) {
    case "page":
      return `/${site}/${uid}`;

    default:
      return "/";
  };
};

```

**Querying the right UID:**  
Here I'd suggest leveraging Vue router params to resolve the UID and query the right document:

```
// ~/pages/mysite1/_uid.vue
export default {
  async asyncData({ route }) {
    const site = route.path.split("/").filter(i => !!i)[0];
    const resolvedUid = `${site}--${route.params.uid}`; // e.g. "mysite1--contact-us"
    /* ... */
  }
};

```

Give this a try and let me know.

Thanks,

Priyanka

---

_[View the full topic](https://community.prismic.io/t/nuxt-with-sm-routes/2723)._
