Skip to content

Commit b5635fa

Browse files
committed
Update Angular documentation (12.0.0)
1 parent 314010b commit b5635fa

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

lib/docs/filters/angular/entries.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ def get_type
1212
'Guide'
1313
elsif slug.start_with?('tutorial')
1414
'Tutorial'
15+
elsif slug.start_with?('api/platform-browser-dynamic')
16+
'platform-browser-dynamic'
1517
elsif node = at_css('th:contains("npm Package")')
1618
node.next_element.content.remove('@angular/')
1719
elsif at_css('.api-type-label.module')

lib/docs/scrapers/angular.rb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def handle_response(response)
5959
end
6060

6161
version do
62-
self.release = '11.2.6'
62+
self.release = '12.0.0'
6363
self.base_url = 'https://angular.io/'
6464
self.root_path = 'docs'
6565

@@ -78,6 +78,26 @@ def handle_response(response)
7878
include Docs::Angular::Common
7979
end
8080

81+
version '11' do
82+
self.release = '11.2.14'
83+
self.base_url = 'https://v11.angular.io/'
84+
self.root_path = 'docs'
85+
86+
html_filters.push 'angular/clean_html', 'angular/entries'
87+
88+
options[:follow_links] = false
89+
options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/]
90+
options[:fix_urls_before_parse] = ->(url) do
91+
url.sub! %r{\Aguide/}, '/guide/'
92+
url.sub! %r{\Atutorial/}, '/tutorial/'
93+
url.sub! %r{\Aapi/}, '/api/'
94+
url.sub! %r{\Agenerated/}, '/generated/'
95+
url
96+
end
97+
98+
include Docs::Angular::Common
99+
end
100+
81101
version '10' do
82102
self.release = '10.2.3'
83103
self.base_url = 'https://v10.angular.io/'

0 commit comments

Comments
 (0)