瀏覽代碼

Update Meteor documentation (1.4.1, 1.3.5)

Thibaut Courouble 9 年之前
父節點
當前提交
51944f6cef
共有 2 個文件被更改,包括 9 次插入2 次删除
  1. 1 0
      lib/docs/filters/meteor/entries.rb
  2. 8 2
      lib/docs/scrapers/meteor.rb

+ 1 - 0
lib/docs/filters/meteor/entries.rb

@@ -9,6 +9,7 @@ module Docs
         if subpath.start_with?('api')
           name
         else
+          return 'Guide: Blaze' if base_url.host == 'blazejs.org' && subpath.start_with?('guide')
           type = at_css('.item-toc.current').ancestors('li').first.at_css('.heading-toc').try(:content) || 'Guide'
           type.prepend 'Guide: ' if base_url.host == 'guide.meteor.com' && type != 'Guide'
           type

+ 8 - 2
lib/docs/scrapers/meteor.rb

@@ -19,14 +19,20 @@ module Docs
       writing-packages.html
     )
 
+    options[:fix_urls] = ->(url) {
+      url.sub! 'https://docs.meteor.com/api/blaze.html', 'http://blazejs.org/api/blaze.html'
+      url.sub! 'https://docs.meteor.com/api/templates.html', 'http://blazejs.org/api/templates.html'
+      url
+    }
+
     options[:attribution] = <<-HTML
       &copy; 2011&ndash;2016 Meteor Development Group<br>
       Licensed under the MIT License.
     HTML
 
     version '1.4' do
-      self.release = '1.4.0'
-      self.base_urls = ['https://docs.meteor.com/', 'https://guide.meteor.com/']
+      self.release = '1.4.1'
+      self.base_urls = ['https://docs.meteor.com/', 'https://guide.meteor.com/', 'http://blazejs.org/']
     end
 
     version '1.3' do