瀏覽代碼

Update Cordova documentation (7.0.1, 6.5.0)

Thibaut Courouble 8 年之前
父節點
當前提交
32a16c92ed
共有 2 個文件被更改,包括 12 次插入2 次删除
  1. 5 1
      lib/docs/filters/cordova/clean_html.rb
  2. 7 1
      lib/docs/scrapers/cordova.rb

+ 5 - 1
lib/docs/filters/cordova/clean_html.rb

@@ -6,7 +6,7 @@ module Docs
 
         at_css('h1').content = 'Apache Cordova' if root_page?
 
-        css('hr', '.content-header', 'button').remove
+        css('hr', '.content-header', 'button', '.docs-alert').remove
 
         css('.home', '#page-toc-source', '.highlight', 'th h2').each do |node|
           node.before(node.children).remove
@@ -29,6 +29,10 @@ module Docs
           node['id'] = node.content.strip.parameterize
         end
 
+        css('> table:first-child + h1').each do |node|
+          node.previous_element.remove
+        end
+
         doc
       end
     end

+ 7 - 1
lib/docs/scrapers/cordova.rb

@@ -4,7 +4,8 @@ module Docs
     self.type = 'cordova'
     self.root_path = 'guide/overview/index.html'
     self.links = {
-      home: 'https://cordova.apache.org/'
+      home: 'https://cordova.apache.org/',
+      code: 'https://git-wip-us.apache.org/repos/asf/cordova-cli.git'
     }
 
     html_filters.push 'cordova/entries', 'cordova/clean_html'
@@ -27,6 +28,11 @@ module Docs
       Licensed under the Apache License 2.0.
     HTML
 
+    version '7' do
+      self.release = '7.0.1'
+      self.base_url = 'https://cordova.apache.org/docs/en/7.x/'
+    end
+
     version '6' do
       self.release = '6.5.0'
       self.base_url = 'https://cordova.apache.org/docs/en/6.x/'