Static GitHub Issues

[1636] multiple route params on a page

prev: Window is not defined when importing vue-table2 plugin
next: nuxtjs with electron `loadURL` is slow

Hello !

I want to generate an url in that format : http://mysite.tld/blog/{slug}-{id}

So I tried to create a page named : /pages/blog/_slug-_id.vue

Nuxt seems not generating the routing as expected.

{
  path: "/blog/:slug-_id?",
  component: _f8ebb47a,
  name: "blog-slug-_id"
}

Is there a page naming convention in nuxt to deal with this route format ?

Or do I have to inject my needed route using router.extendRoutes config ?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1462">#c1462</a>)</em></sub></div>