File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,10 +4,7 @@ class CleanHtmlFilter < Filter
44 def call
55 if root_page?
66 css ( 'h1' ) . each { |node | node . name = 'h2' }
7- css ( 'li > h3' ) . each { |node | node . name = 'div' }
8- elsif slug == 'cordova_events_events.md'
9- css ( 'h1:not(:first-child)' ) . each { |node | node . name = 'h3' }
10- css ( 'h2' ) . each { |node | node . name = 'h4' }
7+ css ( 'li > h2' ) . each { |node | node . name = 'div' }
118 end
129
1310 css ( 'hr' ) . remove
Original file line number Diff line number Diff line change @@ -6,20 +6,14 @@ def get_name
66 end
77
88 def get_type
9- if subpath . start_with? ( 'guide_platforms ' )
9+ if subpath . start_with? ( 'guide/platforms ' )
1010 name [ /Amazon\ Fire\ OS|Android|BlackBerry|Firefox OS|iOS|Windows/ ] || 'Platform Guides'
11+ elsif subpath . start_with? ( 'cordova/events' )
12+ 'Events'
1113 else
1214 'Guides'
1315 end
1416 end
15-
16- def additional_entries
17- return [ ] unless slug == 'cordova_events_events.md'
18-
19- css ( 'h3' ) . map do |node |
20- [ node . content , node [ 'id' ] , 'Events' ]
21- end
22- end
2317 end
2418 end
2519end
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ module Docs
22 class Cordova < UrlScraper
33 self . name = 'Cordova'
44 self . type = 'cordova'
5- self . version = '5.1.1 '
5+ self . version = '5.4.0 '
66 self . base_url = "http://cordova.apache.org/docs/en/#{ version } /"
77 self . root_path = 'index.html'
88 self . links = {
@@ -11,10 +11,10 @@ class Cordova < UrlScraper
1111
1212 html_filters . push 'cordova/clean_html' , 'cordova/entries' , 'title'
1313
14- options [ :container ] = -> ( filter ) { filter . root_page? ? '#home' : '#content ' }
14+ options [ :container ] = -> ( filter ) { filter . root_page? ? '#home' : '#page-toc-source ' }
1515 options [ :title ] = false
1616 options [ :root_title ] = 'Apache Cordova'
17- options [ :skip ] = %w( _index.html guide_support_index.md .html)
17+ options [ :skip ] = %w( page_index .html)
1818
1919 options [ :attribution ] = <<-HTML
2020 © 2012-2015 The Apache Software Foundation< br >
You can’t perform that action at this time.
0 commit comments