|
|
@ -4,7 +4,13 @@ module Docs
|
|
|
|
def get_name
|
|
|
|
def get_name
|
|
|
|
name = at_css('h1').content
|
|
|
|
name = at_css('h1').content
|
|
|
|
name.strip!
|
|
|
|
name.strip!
|
|
|
|
name
|
|
|
|
#name
|
|
|
|
|
|
|
|
subpath_items = subpath.split('/', -1)
|
|
|
|
|
|
|
|
if subpath_items.length >= 5
|
|
|
|
|
|
|
|
subpath_items[3].capitalize + ': ' + name # e.g. Routing: Defining Routes
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
name
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def get_type
|
|
|
|
def get_type
|
|
|
@ -16,8 +22,16 @@ module Docs
|
|
|
|
'Getting Started'
|
|
|
|
'Getting Started'
|
|
|
|
elsif subpath.include?('/messages')
|
|
|
|
elsif subpath.include?('/messages')
|
|
|
|
'Messages'
|
|
|
|
'Messages'
|
|
|
|
|
|
|
|
elsif subpath.include?('/app/building-your-application')
|
|
|
|
|
|
|
|
'Using App Router: Building your application'
|
|
|
|
|
|
|
|
elsif subpath.include?('/app/api-reference')
|
|
|
|
|
|
|
|
'Using App Router: api-reference'
|
|
|
|
elsif subpath.include?('/app')
|
|
|
|
elsif subpath.include?('/app')
|
|
|
|
'Using App Router'
|
|
|
|
'Using App Router'
|
|
|
|
|
|
|
|
elsif subpath.include?('/pages/building-your-application')
|
|
|
|
|
|
|
|
'Using Pages Router: Building your application'
|
|
|
|
|
|
|
|
elsif subpath.include?('/pages/api-reference')
|
|
|
|
|
|
|
|
'Using Pages Router: api-reference'
|
|
|
|
elsif subpath.include?('/pages')
|
|
|
|
elsif subpath.include?('/pages')
|
|
|
|
'Using Pages Router'
|
|
|
|
'Using Pages Router'
|
|
|
|
else
|
|
|
|
else
|
|
|
|