How to implement multi-level categories in categories homepage?

Hi guys:

As we know that many times categories will include secondary categories, such as Music as a primary category, which is divided into different secondary categories based on music type, such as classical, ethnic, rock, etc. The specific display effect in page design like as follows:

Music (10)
> Classical (3)
> Ethnic (4)
> Rock (3)

And then will add categories paramters in markdown file front matter as like :

title:  Music xxxxx
description: Music xxxxx
date: 2023-03-28

  - Music
    - Rock

So how can I coding in the terms page, could someone give me suggestions, thanks.

As described, this is not possible.

You can do this:

categories = ['Music/Classical']

Which will create a list page at:

But it will not create a list page at:

I would think carefully about your content model. The “classical”, “ethnic”, and “rock” descriptors are genres (a taxonomy), while “music” seems like a content type (top level section or a term in another taxonomy).