Unified · Split
| @@ -12,6 +12,13 @@ module Docs · 11 unmodified lines | ||
| 12 | 12 | container.child.before(at_css('header.hero h1')).before(badges).before(css('header.hero + .banner')) |
| 13 | 13 | @doc = container |
| 14 | 14 | |
| 15 | + title = at_css('h1').content.strip | |
| 16 | + if title == 'Index' | |
| 17 | + at_css('h1').content = result[:entries].first.name | |
| 18 | + elsif title == 'Angular' | |
| 19 | + at_css('h1').content = slug.split('/').last.gsub('-', ' ') | |
| 20 | + end | |
| 21 | + | |
| 15 | 22 | css('pre.no-bg-with-indent').each do |node| |
| 16 | 23 | node.content = ' ' + node.content.gsub("\n", "\n ") |
| 17 | 24 | end |
| @@ -11,10 +11,10 @@ module Docs · 10 unmodified lines | ||
| 11 | 11 | name = name.split(':').first |
| 12 | 12 | |
| 13 | 13 | if mod |
| 14 | − if name == 'Testing' | |
| 15 | − return "#{mod.capitalize} Testing" | |
| 16 | − elsif name == 'Index' || name == 'Angular' | |
| 17 | − return mod | |
| 14 | + if name == 'Index' | |
| 15 | + return slug.split('/')[1..-2].join('/') | |
| 16 | + elsif name == 'Angular' | |
| 17 | + return slug.split('/').last.split('-').first | |
| 18 | 18 | end |
| 19 | 19 | end |
| 20 | 20 | |
| @@ -25,7 +25,6 @@ module Docs · 24 unmodified lines | ||
| 25 | 25 | |
| 26 | 26 | options[:fix_urls] = -> (url) do |
| 27 | 27 | url.sub! %r{\A(https://angular\.io/docs/.+/)index\.html\z}, '\1' |
| 28 | − url.sub! %r{\A(https://angular\.io/docs/.+/index)/\z}, '\1' | |
| 29 | 28 | url |
| 30 | 29 | end |
| 31 | 30 | |