Merge pull request #3 from snzow/UpdatedSubsection

sorted sub-subsection by subsection
pull/2180/head
Aodhan Bower 11 months ago committed by GitHub
commit 0ee3c23a77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -7,6 +7,7 @@ module Docs
css('div:contains("NEWS:")').remove
css('h2:contains("sponsors"), #sponsor-table').remove
css('div.sticky').remove #remove the floating menu
css('div.-mt-4').remove #remove the navigation line
css('footer').remove
css('div.feedback_inlineTriggerWrapper__o7yUx').remove
css('header').remove #remove links from the top of the page

@ -4,8 +4,14 @@ module Docs
def get_name
name = at_css('h1').content
name.strip!
#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
def get_type
if subpath.include?('/architecture')
@ -16,8 +22,16 @@ module Docs
'Getting Started'
elsif subpath.include?('/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')
'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')
'Using Pages Router'
else

Loading…
Cancel
Save