Nested routes for content #2081
-
Hi, I have a route called /blog that is linked to from a menu bar on my site. I use the nuxt css class .router-link-active to style that link when currently on the /blog route or any of its children. From my understanding, this is possible only when routes are nested routes. However, I couldn't make it work when using in combination with nuxt content's generated routes from content directory. With this file structure, I manage to get the behavior I want when going to /blog/test, but not when going to /blog/1mock or /blog/2mock Is there a way to achieve what I'd like to do? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It was done on https://content.nuxtjs.org which uses the |
Beta Was this translation helpful? Give feedback.
See https://github.com/nuxt-themes/docus/blob/main/components/app/AppHeaderNavigation.vue#L18-L32 for hints how you could do it.