Dynamic nested pages

Is there a way to have a route structure where there is an unknown amount of slugs eg:
example 1:
site. com/filterX/filterY/list
site. com/filterX/filterY/list/single-post

example 2:
site. com/filterY/list
site. com/filterY/list/single-post

So that the filters will always affect the list, eg clicking on a filter will add a slug but not rerender the page, just the list component?

Tried with index folder that has [...slug].vue but not sure how to have single-post after that regardless of the number of slugs?
Was this page helpful?