@@ -14,25 +14,25 @@ def get_name
1414 end
1515
1616 def get_type
17- if subpath . include ?( '/ architecture' )
17+ if slug . start_with ?( 'architecture' )
1818 'Architecture'
19- elsif subpath . include ?( '/ community' )
19+ elsif slug . start_with ?( 'community' )
2020 'Community'
21- elsif subpath . include ?( '/ getting-started' )
21+ elsif slug . start_with ?( 'getting-started' )
2222 'Getting Started'
23- elsif subpath . include ?( '/ messages' )
23+ elsif slug . start_with ?( 'messages' )
2424 'Messages'
25- elsif subpath . include ?( '/ app/building-your-application' )
25+ elsif slug . start_with ?( 'app/building-your-application' )
2626 'Using App Router: Building your application'
27- elsif subpath . include ?( '/ app/api-reference' )
27+ elsif slug . start_with ?( 'app/api-reference' )
2828 'Using App Router: api-reference'
29- elsif subpath . include ?( '/ app' )
29+ elsif slug . start_with ?( 'app' )
3030 'Using App Router'
31- elsif subpath . include ?( '/ pages/building-your-application' )
31+ elsif slug . start_with ?( 'pages/building-your-application' )
3232 'Using Pages Router: Building your application'
33- elsif subpath . include ?( '/ pages/api-reference' )
33+ elsif slug . start_with ?( 'pages/api-reference' )
3434 'Using Pages Router: api-reference'
35- elsif subpath . include ?( '/ pages' )
35+ elsif slug . start_with ?( 'pages' )
3636 'Using Pages Router'
3737 else
3838 get_name
0 commit comments