浏览代码

Update Angular documentation (2.0.0rc6)

Closes #472.
Thibaut Courouble 9 年之前
父节点
当前提交
f9dfcf4504
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 6 1
      lib/docs/filters/angular/entries.rb
  2. 1 1
      lib/docs/scrapers/angular.rb

+ 6 - 1
lib/docs/filters/angular/entries.rb

@@ -2,7 +2,12 @@ module Docs
   class Angular
     class EntriesFilter < Docs::EntriesFilter
       def get_name
-        name = at_css('header.hero h1').content.strip
+        if slug.start_with?('tutorial') || slug.start_with?('guide')
+          name = at_css('.nav-list-item.is-selected').content.strip
+        else
+          name = at_css('header.hero h1').content.strip
+        end
+
         name = name.split(':').first
 
         if mod

+ 1 - 1
lib/docs/scrapers/angular.rb

@@ -42,7 +42,7 @@ module Docs
     end
 
     version '2.0 TypeScript' do
-      self.release = '2.0.0rc5'
+      self.release = '2.0.0rc6'
       self.base_url = "https://angular.io/docs/ts/latest/"
     end