History

angular: add version 9

Simon Legner committed 6 years ago

Commit 76b82ac1 parent ff5ffaf2 files · +28 −3Browse files

Unified · Split

2 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +6 −1
  2. lib/docs/scrapers/angular.rb +22 −2
assets/javascripts/templates/pages/about_tmpl.coffee+6−1
@@ -82,10 +82,15 @@ app.templates.aboutPage = -> """ · 81 unmodified lines
8282 """
8383
8484 credits = [
85− [ 'Angular<br>Angular.js',
85+ [ 'Angular.js',
8686 '2010-2020 Google, Inc.',
8787 'CC BY 3.0',
8888 'https://creativecommons.org/licenses/by/3.0/'
89+ ], [
90+ 'Angular',
91+ '2010-2020 Google, Inc.',
92+ 'CC BY',
93+ 'https://creativecommons.org/licenses/by/4.0/'
8994 ], [
9095 'Ansible',
9196 '2012-2018 Michael DeHaan<br>&copy; 2018–2019 Red Hat, Inc.',
lib/docs/scrapers/angular.rb+22−2
@@ -11,7 +11,7 @@ module Docs · 10 unmodified lines
1111 options[:max_image_size] = 256_000
1212
1313 options[:attribution] = <<-HTML
14− &copy; 2010&ndash;2019 Google, Inc.<br>
14+ &copy; 2010&ndash;2020 Google, Inc.<br>
1515 Licensed under the Creative Commons Attribution License 4.0.
1616 HTML
1717
@@ -59,8 +59,28 @@ module Docs · 41 unmodified lines
5959 end
6060
6161 version do
62+ self.release = '9.1.12'
63+ self.base_url = 'https://v9.angular.io/'
64+ self.root_path = 'docs'
65+
66+ html_filters.push 'angular/clean_html', 'angular/entries'
67+
68+ options[:follow_links] = false
69+ options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/]
70+ options[:fix_urls_before_parse] = ->(url) do
71+ url.sub! %r{\Aguide/}, '/guide/'
72+ url.sub! %r{\Atutorial/}, '/tutorial/'
73+ url.sub! %r{\Aapi/}, '/api/'
74+ url.sub! %r{\Agenerated/}, '/generated/'
75+ url
76+ end
77+
78+ include Docs::Angular::Common
79+ end
80+
81+ version '8' do
6282 self.release = '8.2.14'
63− self.base_url = 'https://angular.io/'
83+ self.base_url = 'https://v8.angular.io/'
6484 self.root_path = 'docs'
6585
6686 html_filters.push 'angular/clean_html', 'angular/entries'