Unified · Split
| @@ -7,6 +7,7 @@ module Docs · 6 unmodified lines | ||
| 7 | 7 | css('div:contains("NEWS:")').remove |
| 8 | 8 | css('h2:contains("sponsors"), #sponsor-table').remove |
| 9 | 9 | css('div.sticky').remove #remove the floating menu |
| 10 | + css('div.-mt-4').remove #remove the navigation line | |
| 10 | 11 | css('footer').remove |
| 11 | 12 | css('div.feedback_inlineTriggerWrapper__o7yUx').remove |
| 12 | 13 | css('header').remove #remove links from the top of the page |
| @@ -4,7 +4,13 @@ module Docs · 3 unmodified lines | ||
| 4 | 4 | def get_name |
| 5 | 5 | name = at_css('h1').content |
| 6 | 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 | 14 | end |
| 9 | 15 | |
| 10 | 16 | def get_type |
| @@ -16,8 +22,16 @@ module Docs · 5 unmodified lines | ||
| 16 | 22 | 'Getting Started' |
| 17 | 23 | elsif subpath.include?('/messages') |
| 18 | 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 | 29 | elsif subpath.include?('/app') |
| 20 | 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 | 35 | elsif subpath.include?('/pages') |
| 22 | 36 | 'Using Pages Router' |
| 23 | 37 | else |