Unified · Split
| @@ -7,6 +7,7 @@ module Docs · 6 unmodified lines | |||
| 7 | css('div:contains("NEWS:")').remove | 7 | css('div:contains("NEWS:")').remove |
| 8 | css('h2:contains("sponsors"), #sponsor-table').remove | 8 | css('h2:contains("sponsors"), #sponsor-table').remove |
| 9 | css('div.sticky').remove #remove the floating menu | 9 | css('div.sticky').remove #remove the floating menu |
| 10 | css('div.-mt-4').remove #remove the navigation line | ||
| 10 | css('footer').remove | 11 | css('footer').remove |
| 11 | css('div.feedback_inlineTriggerWrapper__o7yUx').remove | 12 | css('div.feedback_inlineTriggerWrapper__o7yUx').remove |
| 12 | css('header').remove #remove links from the top of the page | 13 | css('header').remove #remove links from the top of the page |
| @@ -4,7 +4,13 @@ module Docs · 3 unmodified lines | |||
| 4 | def get_name | 4 | def get_name |
| 5 | name = at_css('h1').content | 5 | name = at_css('h1').content |
| 6 | name.strip! | 6 | name.strip! |
| 7 | name | 7 | #name |
| 8 | subpath_items = subpath.split('/', -1) | ||
| 9 | if subpath_items.length >= 5 | ||
| 10 | subpath_items[3].capitalize + ': ' + name # e.g. Routing: Defining Routes | ||
| 11 | else | ||
| 12 | name | ||
| 13 | end | ||
| 8 | end | 14 | end |
| 9 | 15 | ||
| 10 | def get_type | 16 | def get_type |
| @@ -16,8 +22,16 @@ module Docs · 5 unmodified lines | |||
| 16 | 'Getting Started' | 22 | 'Getting Started' |
| 17 | elsif subpath.include?('/messages') | 23 | elsif subpath.include?('/messages') |
| 18 | 'Messages' | 24 | 'Messages' |
| 25 | elsif subpath.include?('/app/building-your-application') | ||
| 26 | 'Using App Router: Building your application' | ||
| 27 | elsif subpath.include?('/app/api-reference') | ||
| 28 | 'Using App Router: api-reference' | ||
| 19 | elsif subpath.include?('/app') | 29 | elsif subpath.include?('/app') |
| 20 | 'Using App Router' | 30 | 'Using App Router' |
| 31 | elsif subpath.include?('/pages/building-your-application') | ||
| 32 | 'Using Pages Router: Building your application' | ||
| 33 | elsif subpath.include?('/pages/api-reference') | ||
| 34 | 'Using Pages Router: api-reference' | ||
| 21 | elsif subpath.include?('/pages') | 35 | elsif subpath.include?('/pages') |
| 22 | 'Using Pages Router' | 36 | 'Using Pages Router' |
| 23 | else | 37 | else |